Return-Path: Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:14224 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753635AbdJGWi4 (ORCPT ); Sat, 7 Oct 2017 18:38:56 -0400 From: "Levin, Alexander (Sasha Levin)" Cc: Javier Martinez Canillas , Andy Shevchenko , "Levin, Alexander (Sasha Levin)" To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH review for 3.18 08/12] platform/x86: intel_mid_thermal: Fix module autoload Date: Sat, 7 Oct 2017 22:38:00 +0000 Message-ID: <20171007223752.25085-8-alexander.levin@verizon.com> References: <20171007223752.25085-1-alexander.levin@verizon.com> In-Reply-To: <20171007223752.25085-1-alexander.levin@verizon.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Javier Martinez Canillas [ Upstream commit a93151a72061e944a4915458b1b1d6d505c03bbf ] If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias $ After this patch: $ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias alias: platform:msic_thermal Signed-off-by: Javier Martinez Canillas Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- drivers/platform/x86/intel_mid_thermal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x8= 6/intel_mid_thermal.c index ab7860a21a22..4709206e5eed 100644 --- a/drivers/platform/x86/intel_mid_thermal.c +++ b/drivers/platform/x86/intel_mid_thermal.c @@ -551,6 +551,7 @@ static const struct platform_device_id therm_id_table[]= =3D { { "msic_thermal", 1 }, { } }; +MODULE_DEVICE_TABLE(platform, therm_id_table); =20 static struct platform_driver mid_thermal_driver =3D { .driver =3D { --=20 2.11.0