From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Olof Johansson <olof@lixom.net>
Cc: Doug Anderson <dianders@chromium.org>,
Gwendal Grignou <gwendal@google.com>,
Lee Jones <lee.jones@linaro.org>,
linux-kernel@vger.kernel.org,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: [PATCH 3/3] platform/chrome: cros_ec_dev - Add a platform device ID table
Date: Wed, 20 May 2015 10:39:07 +0200 [thread overview]
Message-ID: <1432111147-21354-4-git-send-email-javier.martinez@collabora.co.uk> (raw)
In-Reply-To: <1432111147-21354-1-git-send-email-javier.martinez@collabora.co.uk>
If the cros_ec_dev driver is built as a module, modalias information is
not filled so the module is not autoloaded. Add a platform device table
and use the MODULE_DEVICE_TABLE() macro to export that information in
the module so user-space can match the modalias uevent and autoload it.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
drivers/platform/chrome/cros_ec_dev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/platform/chrome/cros_ec_dev.c b/drivers/platform/chrome/cros_ec_dev.c
index 6090d0b2826f..4232c8136939 100644
--- a/drivers/platform/chrome/cros_ec_dev.c
+++ b/drivers/platform/chrome/cros_ec_dev.c
@@ -216,6 +216,12 @@ static int ec_device_remove(struct platform_device *pdev)
return 0;
}
+static const struct platform_device_id cros_ec_id[] = {
+ { "cros-ec-ctl", 0 },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(platform, cros_ec_id);
+
static struct platform_driver cros_ec_dev_driver = {
.driver = {
.name = "cros-ec-ctl",
--
2.1.4
next prev parent reply other threads:[~2015-05-20 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 8:39 [PATCH 0/3] platform/chrome: Changes for cros_ec_lpc and cros_ec_dev Javier Martinez Canillas
2015-05-20 8:39 ` [PATCH 1/3] platform/chrome: cros_ec_lpc - Use existing function to check EC result Javier Martinez Canillas
2015-05-20 8:39 ` [PATCH 2/3] platform/chrome: cros_ec_lpc - Add support for Google Pixel 2 Javier Martinez Canillas
2015-05-20 8:39 ` Javier Martinez Canillas [this message]
2015-05-28 9:10 ` [PATCH 0/3] platform/chrome: Changes for cros_ec_lpc and cros_ec_dev Javier Martinez Canillas
2015-06-16 6:47 ` Javier Martinez Canillas
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=1432111147-21354-4-git-send-email-javier.martinez@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=dianders@chromium.org \
--cc=gwendal@google.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.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
all inboxes | Powered by JetHome®