From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752614AbdHIIoV (ORCPT ); Wed, 9 Aug 2017 04:44:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53310 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752454AbdHIIoS (ORCPT ); Wed, 9 Aug 2017 04:44:18 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4EC307EA8E Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=javierm@redhat.com From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Hans de Goede , Javier Martinez Canillas , Lee Jones Subject: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload Date: Wed, 9 Aug 2017 10:44:04 +0200 Message-Id: <20170809084404.781-2-javierm@redhat.com> In-Reply-To: <20170809084404.781-1-javierm@redhat.com> References: <20170809084404.781-1-javierm@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 09 Aug 2017 08:44:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver has a tristate Kconfig symbol so it can be built as a module, but it doesn't export the device aliases in the module. So if the driver is built as module, autoload won't work since udev/kmod won't be able to match the registered ACPI device with its corresponding driver module. Use the MODULE_DEVICE_TABLE() macro to export the ACPI device as alias. Before this patch: $ modinfo drivers/mfd/intel_soc_pmic_chtwc.ko | grep alias $ After this patch $ modinfo drivers/mfd/intel_soc_pmic_chtwc.ko | grep alias alias: acpi*:INT34D3:* Signed-off-by: Javier Martinez Canillas --- drivers/mfd/intel_soc_pmic_chtwc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/intel_soc_pmic_chtwc.c b/drivers/mfd/intel_soc_pmic_chtwc.c index ca01ecd1e546..b8b38d164981 100644 --- a/drivers/mfd/intel_soc_pmic_chtwc.c +++ b/drivers/mfd/intel_soc_pmic_chtwc.c @@ -212,6 +212,7 @@ static const struct acpi_device_id cht_wc_acpi_ids[] = { { "INT34D3", }, { } }; +MODULE_DEVICE_TABLE(acpi, cht_wc_acpi_ids); static struct i2c_driver cht_wc_driver = { .driver = { -- 2.13.3