From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752677AbdHIMDD (ORCPT ); Wed, 9 Aug 2017 08:03:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41610 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752409AbdHIMDC (ORCPT ); Wed, 9 Aug 2017 08:03:02 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D5A68FFC8B Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=hdegoede@redhat.com Subject: Re: [PATCH 2/2] mfd: intel_soc_pmic_chtwc: Fix module autoload To: Javier Martinez Canillas , linux-kernel@vger.kernel.org Cc: Lee Jones References: <20170809084404.781-1-javierm@redhat.com> <20170809084404.781-2-javierm@redhat.com> From: Hans de Goede Message-ID: <3e535541-db4b-80bf-ae36-96c9c59b11b1@redhat.com> Date: Wed, 9 Aug 2017 14:02:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170809084404.781-2-javierm@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 09 Aug 2017 12:03:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 = { >