input: pwm-beeper: Fix module autoload for OF platform driver
Subsystems (2)
PATCH 2/6 input: pwm-beeper: Fix module autoload for OF platform driver
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work.
Signed-off-by Luis de Bethencourt <[email protected]>
--- drivers/input/misc/pwm-beeper.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/input/misc/pwm-beeper.c +2 -0
@@ -175,6 +175,8 @@ static const struct of_device_id pwm_beeper_match[] = { };#endif +MODULE_DEVICE_TABLE (of, pwm_beeper_match); +static struct platform_driver pwm_beeper_driver = { .probe = pwm_beeper_probe, .remove = pwm_beeper_remove,
Signature · 1 line
2.4.6
Dmitry Torokhov
maintainerHi Luis,
Quoted 13 lines · Luis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work.
Signed-off-by Luis de Bethencourt <[email protected]>--- drivers/input/misc/pwm-beeper.c | 2 ++ 1 file changed, 2 insertions(+)drivers/input/misc/pwm-beeper.c +0
-0
drivers/input/misc/pwm-beeper.c static const struct of_device_id pwm_beeper_match[] = { · line 179
Quoted 5 lines
drivers/input/misc/pwm-beeper.c +2
-0@@ -175,6 +175,8 @@ static const struct of_device_id pwm_beeper_match[] = { };#endif +MODULE_DEVICE_TABLE (of, pwm_beeper_match); +
I'm fairly certain this (ano others) blow up in case of !CONFIG_OF. Please bring MODULE_DEVICE_TABLE into #ifdef block above.
Quoted 6 lines
drivers/input/misc/pwm-beeper.c +0
-1static struct platform_driver pwm_beeper_driver = { .probe = pwm_beeper_probe, .remove = pwm_beeper_remove, --2.4.6
Thanks.
Signature · 1 line
Dmitry