]> git.baikalelectronics.ru Git - kernel.git/commit
USB: gadget: legacy: remove left-over __ref annotations
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 23 Mar 2021 08:16:07 +0000 (09:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Mar 2021 11:57:10 +0000 (12:57 +0100)
commit18e5351559d6e7146b2044761da0eb0305d96085
treebbdd4018fc88135617b39c2966ddadd5e3158bda
parentd9c870f2af3fb97272da2d04889f1df79167f6e1
USB: gadget: legacy: remove left-over __ref annotations

These were added in commit 7ee605c265 ("usb: gadget: add '__ref' for
rndis_config_register() and cdc_config_register()") to silence
modpost, but they didn't fix the real problem - that was fixed later
by removing wrong __init annotations in commit 6bc29c936744 ("usb:
gadget: remove incorrect __init/__exit annotations").

It really never makes sense for a function to be marked __ref unless
it (1) has some conditional that chooses whether to call an __init
function (or access __initdata) or not and (2) has a comment
explaining why the __ref is there and why it is safe.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20210323081607.405904-1-linux@rasmusvillemoes.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/legacy/multi.c