[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170809084404.781-2-javierm@redhat.com>
Date: Wed, 9 Aug 2017 10:44:04 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Hans de Goede <hdegoede@...hat.com>,
Javier Martinez Canillas <javierm@...hat.com>,
Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload
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 <javierm@...hat.com>
---
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
Powered by blists - more mailing lists