Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758006AbcJQOQB convert rfc822-to-8bit (ORCPT ); Mon, 17 Oct 2016 10:16:01 -0400 Received: from unicorn.mansr.com ([81.2.72.234]:56898 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755176AbcJQOPy (ORCPT ); Mon, 17 Oct 2016 10:15:54 -0400 X-Greylist: delayed 380 seconds by postgrey-1.27 at vger.kernel.org; Mon, 17 Oct 2016 10:15:54 EDT From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Jarod Wilson , Arnd Bergmann , Sebastian Frias , Florian Fainelli , Philippe Reynes Subject: Re: [PATCH 2/7] net: ethernet: nb8800: Fix module autoload References: <1476713146-26632-1-git-send-email-javier@osg.samsung.com> <1476713146-26632-3-git-send-email-javier@osg.samsung.com> Date: Mon, 17 Oct 2016 15:09:29 +0100 In-Reply-To: <1476713146-26632-3-git-send-email-javier@osg.samsung.com> (Javier Martinez Canillas's message of "Mon, 17 Oct 2016 11:05:41 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1449 Lines: 48 Javier Martinez Canillas writes: > 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/net/ethernet/aurora/nb8800.ko | grep alias > $ > > After this patch: > > $ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias > alias: of:N*T*Csigma,smp8734-ethernetC* > alias: of:N*T*Csigma,smp8734-ethernet > alias: of:N*T*Csigma,smp8642-ethernetC* > alias: of:N*T*Csigma,smp8642-ethernet > alias: of:N*T*Caurora,nb8800C* > alias: of:N*T*Caurora,nb8800 > > Signed-off-by: Javier Martinez Canillas Acked-by: Mans Rullgard > --- > > drivers/net/ethernet/aurora/nb8800.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c > index 453dc0967125..d5f2ad1a5a30 100644 > --- a/drivers/net/ethernet/aurora/nb8800.c > +++ b/drivers/net/ethernet/aurora/nb8800.c > @@ -1357,6 +1357,7 @@ static const struct of_device_id nb8800_dt_ids[] = { > }, > { } > }; > +MODULE_DEVICE_TABLE(of, nb8800_dt_ids); > > static int nb8800_probe(struct platform_device *pdev) > { > -- -- M?ns Rullg?rd