usb: usb-skeleton: Add hint to find __init and __exit
Subsystems (2)
PATCH 1/1 usb: usb-skeleton: Add hint to find __init and __exit
Comment to find __init and __exit.
--- drivers/usb/usb-skeleton.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/usb-skeleton.c +1 -0
@@ -641,6 +641,7 @@ static struct usb_driver skel_driver = { .supports_autosuspend = 1, }; +/* __init and __exit */ module_usb_driver (skel_driver);MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.25.1
Greg KH
maintainerQuoted 12 lines · Philipp Hortmann
Comment to find
__initand__exit.Signed-off-by Philipp Hortmann <[email protected]>--- drivers/usb/usb-skeleton.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/usb-skeleton.c +0
-0
drivers/usb/usb-skeleton.c static struct usb_driver skel_driver = { · line 645
Quoted 5 lines
drivers/usb/usb-skeleton.c +1
-0@@ -641,6 +641,7 @@ static struct usb_driver skel_driver = { .supports_autosuspend = 1, }; +/* __init and __exit */ module_usb_driver (skel_driver);
This comment makes no sense, sorry. __init and __exit are things that the linker uses, why would you need to "find" them?
thanks,
greg k-h
Quoted 22 lines · Greg KH
Quoted 12 lines · Philipp Hortmann
Comment to find
__initand__exit.Signed-off-by Philipp Hortmann <[email protected]>--- drivers/usb/usb-skeleton.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/usb-skeleton.c +0
-0drivers/usb/usb-skeleton.c static struct usb_driver skel_driver = { · line 645
Quoted 5 lines
drivers/usb/usb-skeleton.c +1
-0@@ -641,6 +641,7 @@ static struct usb_driver skel_driver = { .supports_autosuspend = 1, }; +/* __init and __exit */ module_usb_driver (skel_driver);This comment makes no sense, sorry.
__initand__exitare things that the linker uses, why would you need to "find" them?
Quoted 4 lines
thanks,
greg k-h
When I want to add something to the __init function (debug comment for example), how to do this without knowing that it is in module_usb_driver?
thanks,
Philipp
Greg KH
maintainerQuoted 22 lines · Philipp Hortmann
Quoted 21 lines · Greg KH
Quoted 12 lines · Philipp Hortmann
Comment to find
__initand__exit.Signed-off-by Philipp Hortmann <[email protected]>--- drivers/usb/usb-skeleton.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/usb-skeleton.c +0
-0drivers/usb/usb-skeleton.c static struct usb_driver skel_driver = { · line 644
Quoted 4 lines
drivers/usb/usb-skeleton.c +1
-0@@ -641,6 +641,7 @@ static struct usb_driver skel_driver = { .supports_autosuspend = 1, }; +/* __init and __exit */ module_usb_driver (skel_driver);This comment makes no sense, sorry.
__initand__exitare things that the linker uses, why would you need to "find" them?
Quoted 7 lines
Quoted 4 lines
thanks,
greg k-h
When I want to add something to the
__initfunction (debug comment for example), how to do this without knowing that it is inmodule_usb_driver?
The whole point of the module_usb_driver() macro is to keep a developer from having to write that init_module() and exit_module() functions entirely. I think you are getting confused with the __init and __exit linker hints with the module init/exit functions. They are totally different things.
thanks,
greg k-h