diff options
author | Javier Martinez Canillas <javier.martinez@collabora.co.uk> | 2015-06-22 02:27:20 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2015-10-07 17:34:26 -0400 |
commit | afbf8ec7c4f90ddd3ee8655c591983fb9d399f43 (patch) | |
tree | 8161e3c12b05f913b80faedec672ac2e49ea6d94 | |
parent | 85bba84ead5cec41add1cbdb2978e572add10deb (diff) |
platform/chrome: cros_ec_dev - Add a platform device ID table
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>
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | drivers/platform/chrome/cros_ec_dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_dev.c b/drivers/platform/chrome/cros_ec_dev.c index e8fcdc237029..2f4099820480 100644 --- a/drivers/platform/chrome/cros_ec_dev.c +++ b/drivers/platform/chrome/cros_ec_dev.c | |||
@@ -287,6 +287,12 @@ static int ec_device_remove(struct platform_device *pdev) | |||
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | 289 | ||
290 | static const struct platform_device_id cros_ec_id[] = { | ||
291 | { "cros-ec-ctl", 0 }, | ||
292 | { /* sentinel */ }, | ||
293 | }; | ||
294 | MODULE_DEVICE_TABLE(platform, cros_ec_id); | ||
295 | |||
290 | static struct platform_driver cros_ec_dev_driver = { | 296 | static struct platform_driver cros_ec_dev_driver = { |
291 | .driver = { | 297 | .driver = { |
292 | .name = "cros-ec-ctl", | 298 | .name = "cros-ec-ctl", |