gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
Subsystems (2)
PATCH 1/1 gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
When built into the kernel, the driver causes a link problem:
iproc_gpio_remove' referenced in section .data' of drivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' of drivers/gpio/gpio-xgs-iproc.o
Remove the incorrect annotation.
--- drivers/gpio/gpio-xgs-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-xgs-iproc.c +1 -1
@@ -280,7 +280,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)return 0 ; } -static int __exit iproc_gpio_remove(struct platform_device *pdev) +static int iproc_gpio_remove (struct platform_device *pdev) {struct iproc_gpio_chip *chip;
Signature · 7 lines
2.20.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 8 lines · Arnd Bergmann
When built into the kernel, the driver causes a link problem:
iproc_gpio_remove' referenced in section.data' ofdrivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' ofdrivers/gpio/gpio-xgs-iproc.oRemove the incorrect annotation.
Fixes 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")Signed-off-by Arnd Bergmann <[email protected]>
What's the current best practice w.r.t.__init and __exit? I seem to have messed this up on multiple fronts.
Quoted 17 lines
--- drivers/gpio/gpio-xgs-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-xgs-iproc.c +1
-1@@ -280,7 +280,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)return 0 ; } -static int __exit iproc_gpio_remove(struct platform_device *pdev) +static int iproc_gpio_remove (struct platform_device *pdev) {struct iproc_gpio_chip *chip;
Quoted 8 lines · Chris Packham
Quoted 6 lines · Arnd Bergmann
When built into the kernel, the driver causes a link problem:
iproc_gpio_remove' referenced in section.data' ofdrivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' ofdrivers/gpio/gpio-xgs-iproc.oRemove the incorrect annotation.
Quoted 7 lines
Quoted 2 lines
Fixes 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")Signed-off-by Arnd Bergmann <[email protected]>Reviewed-by Chris Packham <[email protected]>What's the current best practice w.r.t.__init and
__exit? I seem to have messed this up on multiple fronts.
These are used for anything that is a module_init() function or a module_exit() function, or called from one, but generally not for any callbacks.
In particular the probe() and remove() callbacks of a device driver can get called at runtime when the device is hotplugged through sysfs.
Arnd
wt., 10 gru 2019 o 21:24 Chris Packham
<[email protected]> napisał(a):
Quoted 8 lines · Arnd Bergmann
Quoted 6 lines
When built into the kernel, the driver causes a link problem:
iproc_gpio_remove' referenced in section.data' ofdrivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' ofdrivers/gpio/gpio-xgs-iproc.oRemove the incorrect annotation.
Quoted 8 lines
Quoted 2 lines
Fixes 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")Signed-off-by Arnd Bergmann <[email protected]>Reviewed-by Chris Packham <[email protected]>What's the current best practice w.r.t.__init and
__exit? I seem to have messed this up on multiple fronts.
Applied for fixes.
Bartosz