leds: make triggers explicitly non-modular
PATCH 1/1 leds: make triggers explicitly non-modular
The Kconfig currently controlling compilation of this code is:
drivers/leds/trigger/Kconfig:menuconfig LEDS_TRIGGERSdrivers/leds/trigger/Kconfig: bool "LED Trigger support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.
We don't replace module.h with init.h since the file doesn't need that. However it does use EXPORT_SYMBOL, so we add the export.h header.
--- drivers/leds/led-triggers.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/leds/led-triggers.c +1 -5
@@ -11,7 +11,7 @@* */ -#include <linux/module.h> +#include <linux/export.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/spinlock.h>
@@ -357,7 +357,3 @@ void led_trigger_unregister_simple(struct led_trigger *trig)kfree (trig); }EXPORT_SYMBOL_GPL (led_trigger_unregister_simple); - -MODULE_AUTHOR ("Richard Purdie" ); -MODULE_LICENSE ("GPL" ); -MODULE_DESCRIPTION ("LED Triggers Core" );
Signature · 1 line
2.8.4
Hi Paul,
Quoted 39 lines · Paul Gortmaker
The
Kconfigcurrently controlling compilation of this code is:drivers/leds/trigger/Kconfig:menuconfig
LEDS_TRIGGERSdrivers/leds/trigger/Kconfig: bool "LED Trigger support"...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
We also delete the
MODULE_LICENSEtag etc. since all that information is already contained at the top of the file in the comments.We don't replace
module.hwithinit.hsince the file doesn't need that. However it does useEXPORT_SYMBOL, so we add theexport.hheader.Cc Richard Purdie <[email protected]>Cc Jacek Anaszewski <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- drivers/leds/led-triggers.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/leds/led-triggers.c +1
-1@@ -11,7 +11,7 @@* */ -#include <linux/module.h> +#include <linux/export.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/spinlock.h>
drivers/leds/led-triggers.c void led_trigger_unregister_simple(struct led_trigger *trig) · line 363
Quoted 7 lines
drivers/leds/led-triggers.c +0
-4@@ -357,7 +357,3 @@ void led_trigger_unregister_simple(struct led_trigger *trig)kfree (trig); }EXPORT_SYMBOL_GPL (led_trigger_unregister_simple); - -MODULE_AUTHOR ("Richard Purdie" ); -MODULE_LICENSE ("GPL" ); -MODULE_DESCRIPTION ("LED Triggers Core" );
Thanks for the patch, applied.
Signature · 2 lines
Best regards, Jacek Anaszewski