From: Ondrej Zary <linux@rainbow-software.org>
To: "Márton Németh" <nm127@freemail.hu>
Cc: Bryan Wu <bryan.wu@canonical.com>,
Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] leds-clevo-mail: add MODULE_DEVICE_TABLE
Date: Wed, 1 Aug 2012 23:04:46 +0200 [thread overview]
Message-ID: <201208012304.46593.linux@rainbow-software.org> (raw)
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
next reply other threads:[~2012-08-01 21:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 21:04 Ondrej Zary [this message]
2012-08-02 3:45 ` [PATCH 1/2] leds-clevo-mail: add MODULE_DEVICE_TABLE Bryan Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201208012304.46593.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=bryan.wu@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=nm127@freemail.hu \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox