Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753567AbcJNPez (ORCPT ); Fri, 14 Oct 2016 11:34:55 -0400 Received: from mail1.bemta8.messagelabs.com ([216.82.243.195]:47608 "EHLO mail1.bemta8.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbcJNPer (ORCPT ); Fri, 14 Oct 2016 11:34:47 -0400 X-Greylist: delayed 423 seconds by postgrey-1.27 at vger.kernel.org; Fri, 14 Oct 2016 11:34:46 EDT X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOIsWRWlGSWpSXmKPExsVy+LrFKt3Unww RBifbpS3mX7nGavHm7Romi02PgazLu+awWXzuPcJo8eRhH5sDm8fOWXfZPRbvecnksXlJvceW fiDv8ya5ANYo1sy8pPyKBNaMU8/2MhXs5axYurqNvYHxF3sXIxeHkMByRom2HTuYIZwdjBJvz r1k6WLk5BAWsJH4sO0EK4gtIhAm8WnjO0aQImaBSYwSz278ZYToaGKU+L3wNTtIFZuAicTN++ eAujk4eAX0JS4dlgIJswioSlx9d4wJxBYVSJD49PQn2AJeAUGJkzOfgNmcAu4SvW8Wg9UwC2h KtG7/zQ5hy0tsfzuHGcQWEtCWeL9xMesERv5ZSNpnIWmZhaRlASPzKkaN4tSistQiXUMjvaSi zPSMktzEzBxdQwMLvdzU4uLE9NScxKRiveT83E2MwABnAIIdjBNmOR9ilORgUhLltfnKECHEl 5SfUpmRWJwRX1Sak1p8iFGGg0NJgrf8B1BOsCg1PbUiLTMHGGswaQkOHiUR3kvfgdK8xQWJuc WZ6RCpU4yKUuK8ViB9AiCJjNI8uDZYfF9ilJUS5mUEOkSIpyC1KDezBFX+FaM4B6OSMO8jkPE 8mXklcNNfAS1mAlr8oQ1scUkiQkqqgXFS+pf+6aVHBP/NW6O48I7r7s813fNuBsi5FDUpn3St MBPh31tzND6gUCiQe+OTXSEJQpbT3h5yC5Hex1/9ID35ZsJcxSyrkLRbjzm+2y3omrlyhm6F1 ebWmbu6Ch4paOx4u932vhzzsvrdmixOx9szpn1yY/rLoWJRd1jc5XRzy/u1JlzfJiixFGckGm oxFxUnAgBn5BvB6gIAAA== X-Env-Sender: Marc_Gonzalez@sigmadesigns.com X-Msg-Ref: server-7.tower-96.messagelabs.com!1476458852!20732560!1 X-Originating-IP: [195.215.56.170] X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Subject: Re: [PATCH 2/3] thermal: tango: Fix module autoload To: Javier Martinez Canillas , CC: , Eduardo Valentin , "Zhang Rui" , References: <1476455702-21748-1-git-send-email-javier@osg.samsung.com> <1476455702-21748-3-git-send-email-javier@osg.samsung.com> From: Marc Gonzalez Message-ID: <5800F962.8040605@sigmadesigns.com> Date: Fri, 14 Oct 2016 17:27:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: <1476455702-21748-3-git-send-email-javier@osg.samsung.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1212 Lines: 40 On 14/10/2016 16:35, Javier Martinez Canillas wrote: > 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/thermal/tango_thermal.ko | grep alias > $ > > After this patch: > > $ modinfo drivers/thermal/tango_thermal.ko | grep alias > alias: of:N*T*Csigma,smp8758-thermalC* > alias: of:N*T*Csigma,smp8758-thermal > > Signed-off-by: Javier Martinez Canillas > --- > > drivers/thermal/tango_thermal.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c > index 201304aeafeb..4e67795cb6ce 100644 > --- a/drivers/thermal/tango_thermal.c > +++ b/drivers/thermal/tango_thermal.c > @@ -107,6 +107,7 @@ static const struct of_device_id tango_sensor_ids[] = { > }, > { /* sentinel */ } > }; > +MODULE_DEVICE_TABLE(of, tango_sensor_ids); Thanks for fixing it :-) Acked-by: Marc Gonzalez Regards.