From: Javier Martinez Canillas Date: Mon, 22 Jun 2015 06:27:20 +0000 (+0200) Subject: platform/chrome: cros_ec_dev - Add a platform device ID table X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=afbf8ec7c4f90ddd3ee8655c591983fb9d399f43;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Olof Johansson --- 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) 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",