Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1707292

Re: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload

From Hans de Goede <hdegoede@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload
Date 2017-08-09 14:10 +0200
Message-ID <ucxYf-6SW-35@gated-at.bofh.it> (permalink)
References <ucuQF-4Bw-1@gated-at.bofh.it> <ucuQG-4Bw-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 09-08-17 10:44, Javier Martinez Canillas wrote:
> 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@redhat.com>

As the Kconfig help text mentions this driver should always be
builtin if enabled. But I somehow made a mistake and it became a
tristate  in Kconfig instead of a bool. A patch to fix this
(make it a bool) is pending, so this patch is not necessary:

NACK.

Regards,

Hans



> 
> ---
> 
>   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	= {
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] mfd: intel_soc_pmic_chtwc: Remove unneeded I2C device ID table Javier Martinez Canillas <javierm@redhat.com> - 2017-08-09 10:50 +0200
  [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload Javier Martinez Canillas <javierm@redhat.com> - 2017-08-09 10:50 +0200
    Re: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload Hans de Goede <hdegoede@redhat.com> - 2017-08-09 14:10 +0200
      Re: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload Javier Martinez Canillas <javierm@redhat.com> - 2017-08-09 14:30 +0200
  Re: [PATCH 1/2] mfd: intel_soc_pmic_chtwc: Remove unneeded I2C device  ID table Hans de Goede <hdegoede@redhat.com> - 2017-08-09 14:10 +0200

csiph-web