linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
	linux-kernel@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload
Date: Wed, 9 Aug 2017 14:02:45 +0200	[thread overview]
Message-ID: <3e535541-db4b-80bf-ae36-96c9c59b11b1@redhat.com> (raw)
In-Reply-To: <20170809084404.781-2-javierm@redhat.com>

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

  reply	other threads:[~2017-08-09 12:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09  8:44 [PATCH 1/2] mfd: intel_soc_pmic_chtwc: Remove unneeded I2C device ID table Javier Martinez Canillas
2017-08-09  8:44 ` [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload Javier Martinez Canillas
2017-08-09 12:02   ` Hans de Goede [this message]
2017-08-09 12:22     ` Javier Martinez Canillas
2017-08-09 12:01 ` [PATCH 1/2] mfd: intel_soc_pmic_chtwc: Remove unneeded I2C device ID table Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e535541-db4b-80bf-ae36-96c9c59b11b1@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=javierm@redhat.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).