Commit 96f09791 authored by Ondrej Zary's avatar Ondrej Zary Committed by Bryan Wu

leds-clevo-mail: add MODULE_DEVICE_TABLE

Enable autoloading of leds-clevo-mail by using MODULE_DEVICE_TABLE.
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarBryan Wu <bryan.wu@canonical.com>
parent 55d512e2
...@@ -31,7 +31,7 @@ static int __init clevo_mail_led_dmi_callback(const struct dmi_system_id *id) ...@@ -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. * Contains the known good models this driver is compatible with.
* When adding a new model try to be as strict as possible. This * 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,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 * detected as working, but in reality it is not) as low as
* possible. * 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, .callback = clevo_mail_led_dmi_callback,
.ident = "Clevo D410J", .ident = "Clevo D410J",
...@@ -89,6 +89,7 @@ static struct dmi_system_id __initdata mail_led_whitelist[] = { ...@@ -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, static void clevo_mail_led_set(struct led_classdev *led_cdev,
enum led_brightness value) enum led_brightness value)
...@@ -180,7 +181,7 @@ static int __init clevo_mail_led_init(void) ...@@ -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 */ /* Check with the help of DMI if we are running on supported hardware */
if (!nodetect) { if (!nodetect) {
count = dmi_check_system(mail_led_whitelist); count = dmi_check_system(clevo_mail_led_dmi_table);
} else { } else {
count = 1; count = 1;
printk(KERN_ERR KBUILD_MODNAME ": Skipping DMI detection. " printk(KERN_ERR KBUILD_MODNAME ": Skipping DMI detection. "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment