From patchwork Tue Sep 6 14:06:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9317067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ADFC160752 for ; Tue, 6 Sep 2016 14:09:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA8F328A4A for ; Tue, 6 Sep 2016 14:09:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F82628B61; Tue, 6 Sep 2016 14:09:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F1A9828A4A for ; Tue, 6 Sep 2016 14:09:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhH2G-000172-Hy; Tue, 06 Sep 2016 14:07:36 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhH1D-0000fb-4J for linux-arm-kernel@lists.infradead.org; Tue, 06 Sep 2016 14:06:38 +0000 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0Mb8mZ-1bN7h53TrP-00Kcrn; Tue, 06 Sep 2016 16:06:00 +0200 From: Arnd Bergmann To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCH 3/4] ARM: orion5x: avoid NO_IRQ in orion_ge00_switch_init Date: Tue, 6 Sep 2016 16:06:22 +0200 Message-Id: <20160906140623.2853066-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160906140623.2853066-1-arnd@arndb.de> References: <20160906140623.2853066-1-arnd@arndb.de> X-Provags-ID: V03:K0:lXzx3Cb1zzk200BlefjjRw/0aRVLSzaLsxAxrrW8Bq48whi0/T+ LCx431zoAW1dg1bUSaZo0M8Lwh8sgIEJwSTduyHoleyPXXIVf7x3ueo0P8jFnp82o3Qvw1B ZG3zrv3rFfaG/bl6pO3Nvnmpwsv7K2GuzBbN2vUh2nT2WiJIpAMuHohqRE2BIFo4V7DVZBP lnRg1rxgvoCjrQhcOVHaA== X-UI-Out-Filterresults: notjunk:1; V01:K0:DKyyxZa5vFo=:DyUcCgTtJDhbhgL7fyAOI3 n14E2Y4PqNoVkJ7SHJkPaQOZJyindfx151mPHvOl5dNGwCAbsga0DjUPl4cs4uqs6YHAaJDYK 4EGzqYySss2VmBkrdvjNWz0vQptzwnOvGacGXbHqg84YgDM3/4Okecg5a9Hf0cwgbsSY0mzUD 9dR/yZKtyvaN3R/0spN4x9jg0C/lbK1HLN8w3pSsMyqFkGNjk+StHdOwlEYc8tQcDchR4nNI5 VpHaM4pIkRh26hohdWCAfAOAi5DiopWhLWR5rFeGzkBJn7BUvqyxlxr6v3XQDFr++7h5jzrV/ GMPGTNNjVjvosquOoni3z9zXjly0rvTy5/KSPKnEy0pNyB31kO9p1yKhjGzz7d96NoQuF2W2j R5XzkR6sRobY6rQC1s1dRqBe+UXOWPwys8NDmLvbWQZxxSzPXxNJLBM+34tckki+Ko3vxcmiN rnbmLRj16niyN4eQqxe75wFH2O2IcT5EIfOWmgxGmFQf/vIUwuHxkQMzRCxDsMyChw3VEjIH5 TlSaRKSIMoFB5EX/ybowXvV5L3pG9PgvSSe/03H7+wyQSyZJ0qAOKlaMgVc6kOWmsRguk9V+E 2G8oxeH1RYSHy8d80RwmGcvCaxDUbmnPyJAhPrRUYtP1pOIDlf2AtBfX/VpgBFPw38FVCn+6/ cLQ/B4ya9FIaMCu6MDNnPmcVnzZoIDoG8s4lsaKzBN0TPmocmSErUvqupu3DfkDRfYo0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160906_070631_618946_90CDF6AA X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As of commit 5be9fc23cdb4 ("ARM: orion5x: fix legacy orion5x IRQ numbers"), IRQ zero is no longer a valid interrupt on Orion5x, so we can use the normal convention of using '0' to indicate an invalid interrupt, rather than the deprecated NO_IRQ constant My first approach was to pass a pointer to the resource into orion_ge00_switch_init(), but it seemed to just add complexity for no good. Signed-off-by: Arnd Bergmann --- arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 2 +- arch/arm/mach-orion5x/wnr854t-setup.c | 2 +- arch/arm/mach-orion5x/wrt350n-v2-setup.c | 2 +- arch/arm/plat-orion/common.c | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index c742e7b40b0d..8df5cb8263a2 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c @@ -120,7 +120,7 @@ static void __init rd88f5181l_fxo_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f5181l_fxo_eth_data); - orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, 0); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 4e1e5c8f6111..5e929d5e5a23 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c @@ -124,7 +124,7 @@ static void __init wnr854t_init(void) * Configure peripherals. */ orion5x_eth_init(&wnr854t_eth_data); - orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&wnr854t_switch_plat_data, 0); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 61e9027ef224..826ca94ef248 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c @@ -210,7 +210,7 @@ static void __init wrt350n_v2_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&wrt350n_v2_eth_data); - orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, 0); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 7b9b70785a54..30328e92ca58 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -489,11 +489,10 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq) { int i; - if (irq != NO_IRQ) { - orion_switch_resources[0].start = irq; - orion_switch_resources[0].end = irq; + orion_switch_resources[0].start = irq; + orion_switch_resources[0].end = irq; + if (irq) orion_switch_device.num_resources = 1; - } d->netdev = &orion_ge00.dev; for (i = 0; i < d->nr_chips; i++)