From patchwork Wed Apr 6 09:25:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 8759741 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E8727C0553 for ; Wed, 6 Apr 2016 09:26:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD43C20131 for ; Wed, 6 Apr 2016 09:26:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C1DA201E4 for ; Wed, 6 Apr 2016 09:26:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933883AbcDFJZz (ORCPT ); Wed, 6 Apr 2016 05:25:55 -0400 Received: from sauhun.de ([89.238.76.85]:58206 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755038AbcDFJZu (ORCPT ); Wed, 6 Apr 2016 05:25:50 -0400 Received: from p4fe25799.dip0.t-ipconnect.de ([79.226.87.153]:36624 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1anjic-0000b6-Qd; Wed, 06 Apr 2016 11:25:47 +0200 From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: Wolfram Sang , linux-renesas-soc@vger.kernel.org, linux-sh@vger.kernel.org, Simon Horman , Kuninori Morimoto Subject: [PATCH 2/6] mmc: sh_mobile_sdhi: remove obsolete irq_by_name registration Date: Wed, 6 Apr 2016 11:25:30 +0200 Message-Id: <1459934734-3613-3-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1459934734-3613-1-git-send-email-wsa@the-dreams.de> References: <1459934734-3613-1-git-send-email-wsa@the-dreams.de> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wolfram Sang There is no user left in the kernel, so this code can be removed. (Legacy, non-DT sh_mobile boards have been removed a while ago.) The Acked-by: Rich Felker diff looks more complicated than it is: The if-block for multiplexed isr is now the main code path, the rest is removed. A number of sh boards included the now deleted include file without needing it. Remove that, too. Signed-off-by: Wolfram Sang --- arch/sh/boards/board-sh7757lcr.c | 1 - arch/sh/boards/mach-ap325rxa/setup.c | 1 - arch/sh/boards/mach-ecovec24/setup.c | 1 - arch/sh/boards/mach-kfr2r09/setup.c | 1 - arch/sh/boards/mach-migor/setup.c | 1 - arch/sh/boards/mach-se/7724/setup.c | 1 - drivers/mmc/host/sh_mobile_sdhi.c | 57 +++++------------------------------- include/linux/mmc/sh_mobile_sdhi.h | 10 ------- 8 files changed, 8 insertions(+), 65 deletions(-) delete mode 100644 include/linux/mmc/sh_mobile_sdhi.h diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c index 324599bfad1420..0104c8199c48fe 100644 --- a/arch/sh/boards/board-sh7757lcr.c +++ b/arch/sh/boards/board-sh7757lcr.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 62c3b81300ed28..de8393cb7313bc 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index a9c0c07386fddd..6d612792f6b8ec 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index 6bd9230e64e300..5deb2d82f19f78 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 7a04da3efce402..5de60a77eaa1ab 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index e0e1df136642cd..f1fecd395679ae 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 9beee48d2e280d..51d8dbd5b06a3e 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -315,7 +314,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) struct tmio_mmc_host *host; struct resource *res; int irq, ret, i = 0; - bool multiplexed_isr = true; struct tmio_mmc_dma *dma_priv; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -405,62 +403,23 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) if (ret < 0) goto efree; - /* - * Allow one or more specific (named) ISRs or - * one or more multiplexed (un-named) ISRs. - */ - - irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT); - if (irq >= 0) { - multiplexed_isr = false; - ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_card_detect_irq, 0, + while (1) { + irq = platform_get_irq(pdev, i); + if (irq < 0) + break; + i++; + ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0, dev_name(&pdev->dev), host); if (ret) goto eirq; } - irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDIO); - if (irq >= 0) { - multiplexed_isr = false; - ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdio_irq, 0, - dev_name(&pdev->dev), host); - if (ret) - goto eirq; - } - - irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDCARD); - if (irq >= 0) { - multiplexed_isr = false; - ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdcard_irq, 0, - dev_name(&pdev->dev), host); - if (ret) - goto eirq; - } else if (!multiplexed_isr) { - dev_err(&pdev->dev, - "Principal SD-card IRQ is missing among named interrupts\n"); + /* There must be at least one IRQ source */ + if (!i) { ret = irq; goto eirq; } - if (multiplexed_isr) { - while (1) { - irq = platform_get_irq(pdev, i); - if (irq < 0) - break; - i++; - ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0, - dev_name(&pdev->dev), host); - if (ret) - goto eirq; - } - - /* There must be at least one IRQ source */ - if (!i) { - ret = irq; - goto eirq; - } - } - dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n", mmc_hostname(host->mmc), (unsigned long) (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start), diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h deleted file mode 100644 index 95d6f0314a7ded..00000000000000 --- a/include/linux/mmc/sh_mobile_sdhi.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef LINUX_MMC_SH_MOBILE_SDHI_H -#define LINUX_MMC_SH_MOBILE_SDHI_H - -#include - -#define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect" -#define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard" -#define SH_MOBILE_SDHI_IRQ_SDIO "sdio" - -#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */