Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934919AbcJQOGk (ORCPT ); Mon, 17 Oct 2016 10:06:40 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:35531 "EHLO s-opensource.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934678AbcJQOGM (ORCPT ); Mon, 17 Oct 2016 10:06:12 -0400 From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= , netdev@vger.kernel.org, "David S. Miller" , Jarod Wilson , Arnd Bergmann , Sebastian Frias , Florian Fainelli , Philippe Reynes Subject: [PATCH 2/7] net: ethernet: nb8800: Fix module autoload Date: Mon, 17 Oct 2016 11:05:41 -0300 Message-Id: <1476713146-26632-3-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476713146-26632-1-git-send-email-javier@osg.samsung.com> References: <1476713146-26632-1-git-send-email-javier@osg.samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1264 Lines: 41 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 --- 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) { -- 2.7.4