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: 101842 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp568157qgf; Tue, 6 Sep 2016 07:07:33 -0700 (PDT) X-Received: by 10.98.206.129 with SMTP id y123mr73043758pfg.7.1473170853256; Tue, 06 Sep 2016 07:07:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si35550663pas.289.2016.09.06.07.07.32; Tue, 06 Sep 2016 07:07:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756641AbcIFOH2 (ORCPT + 27 others); Tue, 6 Sep 2016 10:07:28 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:59767 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756507AbcIFOGl (ORCPT ); Tue, 6 Sep 2016 10:06:41 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann 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= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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++)