Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753248AbbETIk6 (ORCPT ); Wed, 20 May 2015 04:40:58 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:53944 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbbETIjd (ORCPT ); Wed, 20 May 2015 04:39:33 -0400 From: Javier Martinez Canillas To: Olof Johansson Cc: Doug Anderson , Gwendal Grignou , Lee Jones , linux-kernel@vger.kernel.org, Javier Martinez Canillas Subject: [PATCH 3/3] platform/chrome: cros_ec_dev - Add a platform device ID table Date: Wed, 20 May 2015 10:39:07 +0200 Message-Id: <1432111147-21354-4-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1432111147-21354-1-git-send-email-javier.martinez@collabora.co.uk> References: <1432111147-21354-1-git-send-email-javier.martinez@collabora.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 35 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/