From patchwork Tue Aug 3 11:40:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12416021 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35E26C4338F for ; Tue, 3 Aug 2021 11:41:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D0EC60560 for ; Tue, 3 Aug 2021 11:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235748AbhHCLlh (ORCPT ); Tue, 3 Aug 2021 07:41:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:33102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235822AbhHCLla (ORCPT ); Tue, 3 Aug 2021 07:41:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B62F760EE9; Tue, 3 Aug 2021 11:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627990879; bh=EktyPkSuaAP0S36bgMFYvE7c9bgTYUSVl2hmFxoFvX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qP4VKlcdB1bL9zPKWEAyKy3oGDCm5QSw+zS2Byi/JgheEoW21WACjc39OBVxnKckF 5KlaUkWa9ZmlbfONtYKC4ThiWEVjAtoRnvOTb5DmPJp4mE4uwc7Id/f/4Hlolk327T wcZ+chEtX+sYdaDMez3kTQTqnCYpV4P/sL7nd8SY/toAVkDJ9tLt/nEbbX+vqBOg2o 54hjKSDBiujjU8wQkxaBQThNRweNxyeY9hXFGFTdWBMp5lKRrHVcOfQmM/10rc6eQc Af1StTOShmALtmkoWJDdd351AW391iUckF877+PtQK7RIdRY+GGCmTBIA4HxarAL4e Z4Qtw55gtg/Bg== From: Arnd Bergmann To: netdev@vger.kernel.org Cc: Arnd Bergmann , "David S. Miller" , "Maciej W. Rozycki" , Alexei Starovoitov , Andrew Lunn , Andrii Nakryiko , Bartosz Golaszewski , Christophe JAILLET , Doug Berger , Eric Dumazet , Finn Thain , Florian Fainelli , Geert Uytterhoeven , Jakub Kicinski , Jessica Yu , Michael Schmitz , Paul Gortmaker , Sam Creasey , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: [PATCH v2 03/14] [net-next] appletalk: ltpc: remove static probing Date: Tue, 3 Aug 2021 13:40:40 +0200 Message-Id: <20210803114051.2112986-4-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210803114051.2112986-1-arnd@kernel.org> References: <20210803114051.2112986-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Arnd Bergmann This driver never relies on the netdev_boot_setup_check() to get its configuration, so it can just as well do its own probing all the time. Signed-off-by: Arnd Bergmann --- drivers/net/Space.c | 3 --- drivers/net/appletalk/ltpc.c | 7 ++----- include/net/Space.h | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/net/Space.c b/drivers/net/Space.c index df79e7370bcc..9196a26615cc 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c @@ -142,9 +142,6 @@ static int __init net_olddevs_init(void) cops_probe(1); cops_probe(2); #endif -#ifdef CONFIG_LTPC - ltpc_probe(); -#endif return 0; } diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index 69c270885ff0..1f8925e75b3f 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c @@ -1015,7 +1015,7 @@ static const struct net_device_ops ltpc_netdev = { .ndo_set_rx_mode = set_multicast_list, }; -struct net_device * __init ltpc_probe(void) +static struct net_device * __init ltpc_probe(void) { struct net_device *dev; int err = -ENOMEM; @@ -1221,12 +1221,10 @@ static int __init ltpc_setup(char *str) } __setup("ltpc=", ltpc_setup); -#endif /* MODULE */ +#endif static struct net_device *dev_ltpc; -#ifdef MODULE - MODULE_LICENSE("GPL"); module_param(debug, int, 0); module_param_hw(io, int, ioport, 0); @@ -1244,7 +1242,6 @@ static int __init ltpc_module_init(void) return PTR_ERR_OR_ZERO(dev_ltpc); } module_init(ltpc_module_init); -#endif static void __exit ltpc_cleanup(void) { diff --git a/include/net/Space.h b/include/net/Space.h index 9cce0d80d37a..e30e7a70ea99 100644 --- a/include/net/Space.h +++ b/include/net/Space.h @@ -21,7 +21,6 @@ struct net_device *mvme147lance_probe(int unit); struct net_device *tc515_probe(int unit); struct net_device *lance_probe(int unit); struct net_device *cops_probe(int unit); -struct net_device *ltpc_probe(void); /* Fibre Channel adapters */ int iph5526_probe(struct net_device *dev);