public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] leds-clevo-mail: add MODULE_DEVICE_TABLE
@ 2012-08-01 21:04 Ondrej Zary
  2012-08-02  3:45 ` Bryan Wu
  0 siblings, 1 reply; 2+ messages in thread
From: Ondrej Zary @ 2012-08-01 21:04 UTC (permalink / raw)
  To: Márton Németh
  Cc: Bryan Wu, Richard Purdie, linux-leds, Kernel development list

Enable autoloading of leds-clevo-mail by using MODULE_DEVICE_TABLE.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -31,7 +31,7 @@ static int __init clevo_mail_led_dmi_callback(const struct dmi_system_id *id)
 }
 
 /*
- * struct mail_led_whitelist - List of known good models
+ * struct clevo_mail_led_dmi_table - List of known good models
  *
  * Contains the known good models this driver is compatible with.
  * When adding a new model try to be as strict as possible. This
@@ -39,7 +39,7 @@ static int __init clevo_mail_led_dmi_callback(const struct dmi_system_id *id)
  * detected as working, but in reality it is not) as low as
  * possible.
  */
-static struct dmi_system_id __initdata mail_led_whitelist[] = {
+static struct dmi_system_id __initdata clevo_mail_led_dmi_table[] = {
 	{
 		.callback = clevo_mail_led_dmi_callback,
 		.ident = "Clevo D410J",
@@ -89,6 +89,7 @@ static struct dmi_system_id __initdata mail_led_whitelist[] = {
 	},
 	{ }
 };
+MODULE_DEVICE_TABLE(dmi, clevo_mail_led_dmi_table);
 
 static void clevo_mail_led_set(struct led_classdev *led_cdev,
 				enum led_brightness value)
@@ -180,7 +181,7 @@ static int __init clevo_mail_led_init(void)
 
 	/* Check with the help of DMI if we are running on supported hardware */
 	if (!nodetect) {
-		count = dmi_check_system(mail_led_whitelist);
+		count = dmi_check_system(clevo_mail_led_dmi_table);
 	} else {
 		count = 1;
 		printk(KERN_ERR KBUILD_MODNAME ": Skipping DMI detection. "




-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-02  3:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 21:04 [PATCH 1/2] leds-clevo-mail: add MODULE_DEVICE_TABLE Ondrej Zary
2012-08-02  3:45 ` Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox