aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-clevo-mail.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2012-08-01 17:04:46 -0400
committerBryan Wu <bryan.wu@canonical.com>2012-09-11 06:32:39 -0400
commit96f09791ec4525e0ad838fe3c5918ceaee3bd81b (patch)
tree661b02c0c2dfc1cd6166b46619e641a2b2c6c080 /drivers/leds/leds-clevo-mail.c
parent55d512e245bc7699a8800e23df1a24195dd08217 (diff)
leds-clevo-mail: add MODULE_DEVICE_TABLE
Enable autoloading of leds-clevo-mail by using MODULE_DEVICE_TABLE. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'drivers/leds/leds-clevo-mail.c')
-rw-r--r--drivers/leds/leds-clevo-mail.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 1ed1677c916f..73eed7ef2a50 100644
--- 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)
31} 31}
32 32
33/* 33/*
34 * struct mail_led_whitelist - List of known good models 34 * struct clevo_mail_led_dmi_table - List of known good models
35 * 35 *
36 * Contains the known good models this driver is compatible with. 36 * Contains the known good models this driver is compatible with.
37 * When adding a new model try to be as strict as possible. This 37 * 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)
39 * detected as working, but in reality it is not) as low as 39 * detected as working, but in reality it is not) as low as
40 * possible. 40 * possible.
41 */ 41 */
42static struct dmi_system_id __initdata mail_led_whitelist[] = { 42static struct dmi_system_id __initdata clevo_mail_led_dmi_table[] = {
43 { 43 {
44 .callback = clevo_mail_led_dmi_callback, 44 .callback = clevo_mail_led_dmi_callback,
45 .ident = "Clevo D410J", 45 .ident = "Clevo D410J",
@@ -89,6 +89,7 @@ static struct dmi_system_id __initdata mail_led_whitelist[] = {
89 }, 89 },
90 { } 90 { }
91}; 91};
92MODULE_DEVICE_TABLE(dmi, clevo_mail_led_dmi_table);
92 93
93static void clevo_mail_led_set(struct led_classdev *led_cdev, 94static void clevo_mail_led_set(struct led_classdev *led_cdev,
94 enum led_brightness value) 95 enum led_brightness value)
@@ -180,7 +181,7 @@ static int __init clevo_mail_led_init(void)
180 181
181 /* Check with the help of DMI if we are running on supported hardware */ 182 /* Check with the help of DMI if we are running on supported hardware */
182 if (!nodetect) { 183 if (!nodetect) {
183 count = dmi_check_system(mail_led_whitelist); 184 count = dmi_check_system(clevo_mail_led_dmi_table);
184 } else { 185 } else {
185 count = 1; 186 count = 1;
186 printk(KERN_ERR KBUILD_MODNAME ": Skipping DMI detection. " 187 printk(KERN_ERR KBUILD_MODNAME ": Skipping DMI detection. "