Skip to content

Commit

Permalink
leds-clevo-mail: add MODULE_DEVICE_TABLE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ondrej Zary authored and Bryan Wu committed Sep 11, 2012
1 parent 55d512e commit 96f0979
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/leds/leds-clevo-mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ 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
* makes it possible to keep the false positives (the model is
* 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",
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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. "
Expand Down

0 comments on commit 96f0979

Please sign in to comment.