From patchwork Mon Oct 31 19:32:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 689577 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3t74KY4bsHz9ryQ for ; Tue, 1 Nov 2016 06:33:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S946003AbcJaTdd (ORCPT ); Mon, 31 Oct 2016 15:33:33 -0400 Received: from mail1.windriver.com ([147.11.146.13]:45754 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S945939AbcJaTdc (ORCPT ); Mon, 31 Oct 2016 15:33:32 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id u9VJXSnT023051 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 31 Oct 2016 12:33:28 -0700 (PDT) Received: from yow-lpgnfs-02.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.294.0; Mon, 31 Oct 2016 12:33:27 -0700 From: Paul Gortmaker To: CC: Paul Gortmaker , "David S. Miller" , Mikael Starvik , Jesper Nilsson , Subject: [PATCH -next] net: cris: make eth_v10.c explicitly non-modular Date: Mon, 31 Oct 2016 15:32:16 -0400 Message-ID: <20161031193216.28154-1-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The Makefile/Kconfig currently controlling compilation of this code is: drivers/net/cris/Makefile:obj-$(CONFIG_ETRAX_ARCH_V10) += eth_v10.o arch/cris/Kconfig:config ETRAX_ARCH_V10 arch/cris/Kconfig: bool ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. There was a one line wrapper for the int init function, which made no sense; hence we just put the device_initcall on the true init function itself and delete the pointless wrapper. In doing that we get rid of the following compile warning: WARNING: drivers/net/built-in.o(.text+0x1e28): Section mismatch in reference from the function etrax_init_module() to the function .init.text:etrax_ethernet_init() We don't replace module.h with init.h since the file already has that. Cc: "David S. Miller" Cc: Mikael Starvik Cc: Jesper Nilsson Cc: netdev@vger.kernel.org Cc: linux-cris-kernel@axis.com Signed-off-by: Paul Gortmaker --- drivers/net/cris/eth_v10.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 221f5f011ff9..b37be25f7459 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c @@ -7,9 +7,6 @@ * */ - -#include - #include #include #include @@ -412,6 +409,7 @@ etrax_ethernet_init(void) led_next_time = jiffies; return 0; } +device_initcall(etrax_ethernet_init) /* set MAC address of the interface. called from the core after a * SIOCSIFADDR ioctl, and from the bootup above. @@ -1715,11 +1713,6 @@ e100_netpoll(struct net_device* netdev) } #endif -static int -etrax_init_module(void) -{ - return etrax_ethernet_init(); -} static int __init e100_boot_setup(char* str) @@ -1742,5 +1735,3 @@ e100_boot_setup(char* str) } __setup("etrax100_eth=", e100_boot_setup); - -module_init(etrax_init_module);