From patchwork Tue Sep 6 13:53:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101849 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp562278qgf; Tue, 6 Sep 2016 06:56:39 -0700 (PDT) X-Received: by 10.98.11.65 with SMTP id t62mr40658169pfi.51.1473170198887; Tue, 06 Sep 2016 06:56:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vu8si35470827pab.180.2016.09.06.06.56.37; Tue, 06 Sep 2016 06:56:38 -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 S1756213AbcIFN4f (ORCPT + 27 others); Tue, 6 Sep 2016 09:56:35 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57315 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755578AbcIFN43 (ORCPT ); Tue, 6 Sep 2016 09:56:29 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LgQuz-1bKMkx0RYD-00nyjx; Tue, 06 Sep 2016 15:56:02 +0200 From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check Date: Tue, 6 Sep 2016 15:53:27 +0200 Message-Id: <20160906135637.2622666-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:X6B94zil5TEUqp7YMEOH5n4pjOzJFLHDPWR0MNLjru+VGINaW1I vouvawK0vdr+0VUoMkXsw2GVfCCZjsemrX3NzC9p9PuCMSYJ8nhQkrc0M5MWWIT+rBEIZj2 HfX7jZH/Dobna274rPT2rRr6wwWAQ313rn92bP7zKYg2cMMFpylTAR7csZBBiuxS84Trqtx YyiSrbtfpjdywR6SivoFw== X-UI-Out-Filterresults: notjunk:1; V01:K0:uN1WCF11gtI=:VSTcArXpCF5goTZ2+TX6DZ kH5mfprQqKXoqmRFQJK4rotSCcxkoPja11TJq8KM69IaJbM5qzj7axpQEvMvxI9qF0FD6zLyY 9t+pus156dfYM+jRxX00rhZ0vNN5Bc7wfnC9BURcUtDPyt1qqTW+Z8cithzA0Y9VgLbNjjuYO w0EGyXG4m9j0jX4ROgk5dSxc+K5m14634tZ7kpgJAMu2kSpFw7//AN5FIuTMdOWaLfP1dPOs2 kkZfw2J7vcpyr6Thyqovebkc5iJQDqUsqd2CVigVkRJhflRpTqs3T4qvk8y1oBumDAnYeXTup jsEW+nnLZfViMZypKMqffQ3sgNkOocuiVD3f5Knu8rc3Gm+FhntlCn3Z13ouiaxiyQ78TEjDy vjB8K9BUjpAkIsKo52v0xtqIngVN3993xoeFK/u+7EMc0B3I9EAAKMT4/7GnLDz946ujPauWv XSA5rbrSS2lRPb4zbK0mlMrCv+Z6CiiJqrofebkGxLTagoNR0gbrgxavmgBON4dyRydtmvm0h d6+ikdvfxDefO1UI7UUP5vaARfv7znWWIOP6JH/bXEmaXfwuVaNn+QXiix7kBAU86meQXFY3V kCfaRuYFen8OFgKFoJlylfG/dsc/38KgHOtdLhnUULKzThQxfxXm8FwwSje4z62+RrsWf/25L rt1pGCOaO9rInMVbPjs7NIZuxXqdrCDIkxmDxbDyNVGZwPjUcJVzNbYfIeRd4t/srIfY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 489447380a29 ("[PATCH] handle errors returned by platform_get_irq*()") ten years ago, the sa1111 driver refuses to work without an interrupt line passed in its resources, so the check for NO_IRQ is unnecessary. I have also checked that all four machines files that register an sa1111 device (lubbock, badge4, journada720, and neponset) do set an interrupt line. Signed-off-by: Arnd Bergmann --- arch/arm/common/sa1111.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) -- 2.9.0 diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index fb0a0a4dfea4..64d8cf08b7d0 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -751,11 +751,9 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq) * The interrupt controller must be initialised before any * other device to ensure that the interrupts are available. */ - if (sachip->irq != NO_IRQ) { - ret = sa1111_setup_irq(sachip, pd->irq_base); - if (ret) - goto err_unmap; - } + ret = sa1111_setup_irq(sachip, pd->irq_base); + if (ret) + goto err_unmap; #ifdef CONFIG_ARCH_SA1100 { @@ -834,12 +832,10 @@ static void __sa1111_remove(struct sa1111 *sachip) clk_disable(sachip->clk); clk_unprepare(sachip->clk); - if (sachip->irq != NO_IRQ) { - irq_set_chained_handler_and_data(sachip->irq, NULL, NULL); - irq_free_descs(sachip->irq_base, SA1111_IRQ_NR); + irq_set_chained_handler_and_data(sachip->irq, NULL, NULL); + irq_free_descs(sachip->irq_base, SA1111_IRQ_NR); - release_mem_region(sachip->phys + SA1111_INTC, 512); - } + release_mem_region(sachip->phys + SA1111_INTC, 512); iounmap(sachip->base); clk_put(sachip->clk);