[PATCH] don't add clevo_mail_led_driver's probe function to the driver struct

From: Uwe Kleine-KÃnig
Date: Mon Jul 13 2009 - 05:12:55 EST


clevo_mail_led_driver is registered using platform_driver_probe which
takes care for the probe function itself. So don't pass it in the
driver struct, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Cc: Márton Németh <nm127@xxxxxxxxxxx>
Cc: Richard Purdie <rpurdie@xxxxxxxxx>
---
Hello,

I'm a bit uncertain if this patch is really useful. There is no
difference in runtime behaviour because platform_driver_probe just
overwrites the .probe member. Nevertheless it's a section violation
that hurts my eye and triggers a false positive for my script that finds
drivers using probe functions in .init.text and
platform_driver_register.

Care? Don't care?

Best regards
Uwe

drivers/leds/leds-clevo-mail.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 1813c84..5b36ae2 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -157,7 +157,6 @@ static int clevo_mail_led_remove(struct platform_device *pdev)
}

static struct platform_driver clevo_mail_led_driver = {
- .probe = clevo_mail_led_probe,
.remove = clevo_mail_led_remove,
.driver = {
.name = KBUILD_MODNAME,
--
tg: (7638d53..) t/noprobecbforplatformdriverprobe/clevo_mail_led_driver (depends on: linus/master)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/