From patchwork Thu Apr 4 07:20:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 10885151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CAA2F1669 for ; Thu, 4 Apr 2019 07:22:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7C46289EC for ; Thu, 4 Apr 2019 07:22:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 994E8289F3; Thu, 4 Apr 2019 07:22:19 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3BB8C289EC for ; Thu, 4 Apr 2019 07:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=UqZY6O718ob8zAmy5X5tQAjpnRViBxy1WQk3v0eA8Mw=; b=CWa9pHipaz/yjTOrrXdWk3SxRg YD/IXeTzoMRkUw8fJUEpVDvntN4FMCNgf6+ge+AkIaTeMXdkdOUTJLCiFJHnRIPIjYi5XsN12wIF/ lnPi9/BR6angYOtPKkmcrUCG2dkw8P0DH2eGYtBER1MYY//3luLkBDDlZffbtgs1ypxJ4Ji0S9UEC xg80qHrKC9Pty7BuvJM1gVrn5NIsJVmZkZBfPDtJQjKuNR04LPfuCg+pIzlvm056wRp9HqToaIiHA 1QMI28SZKPbXrRsHRqllqGcvVtI2HXqDm9kJC9nVKacugHbloLXMF3Z8NUqiCWO98s6pKbw3zaX/s jJWCtchA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBwhP-0007s2-LE; Thu, 04 Apr 2019 07:22:11 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBwhB-0007YT-3X for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 07:22:09 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C06AA61846; Thu, 4 Apr 2019 07:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362516; bh=pz1ferueIQeBlV6rjfmFLqrgocDEOxnV90Rf3nxErqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ilNTrkE0woksoHT3XGYh9hYIVqgvKmWa2TTl40hHNmhOuJhFgBpfCh3+pUk8m+4JM zBxOuZA7XCXw5bqQWlxmBwROtw5bP7Orr6MLT/6dA48mWPIhj1QH+cME5juaTyb5GD GBk+kqnX1Dsv9iXfWw0rCBZekaAqwM1Ay3zl0l8U= Received: from mojha-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mojha@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3430461AB2; Thu, 4 Apr 2019 07:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362501; bh=pz1ferueIQeBlV6rjfmFLqrgocDEOxnV90Rf3nxErqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hTWPe9t5C9EIoMvZELWQvttZlLWlZWRKVnsdXGbTOJM1azNVIhno9xHDJ6Pe20o9Y JdmxwV+PM6ZDoTcA58lmOy8vYgk4/UZIwUfm1wtututN+C5vJTCh/pCFj8jaPvNG2z gnIr39qcbxJNu8LGILIlgCf2a4ix1mItLiU3ImHM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3430461AB2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mojha@codeaurora.org From: Mukesh Ojha To: tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, yamada.masahiro@socionext.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] irqchip/irq-mbigen.c: Use devm_platform_ioremap_resource() Date: Thu, 4 Apr 2019 12:50:10 +0530 Message-Id: <1554362413-3305-5-git-send-email-mojha@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554362413-3305-1-git-send-email-mojha@codeaurora.org> References: <1554362413-3305-1-git-send-email-mojha@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_002157_630755_5B52E0DC X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mukesh Ojha 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 devm_platform_ioremap_resource() internally have platform_get_resource() and devm_ioremap_resource() in it. So instead of calling them separately use devm_platform_ioremap_resource() directly. Signed-off-by: Mukesh Ojha --- drivers/irqchip/irq-ls-scfg-msi.c | 4 +--- drivers/irqchip/irq-mbigen.c | 9 +-------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c index c671b32..aec5a2f 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -336,7 +336,6 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) { const struct of_device_id *match; struct ls_scfg_msi *msi_data; - struct resource *res; int i, ret; match = of_match_device(ls_scfg_msi_id, &pdev->dev); @@ -349,8 +348,7 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) msi_data->cfg = (struct ls_scfg_msi_cfg *) match->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - msi_data->regs = devm_ioremap_resource(&pdev->dev, res); + msi_data->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(msi_data->regs)) { dev_err(&pdev->dev, "failed to initialize 'regs'\n"); return PTR_ERR(msi_data->regs); diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c index 98b6e1d..c9aedfb 100644 --- a/drivers/irqchip/irq-mbigen.c +++ b/drivers/irqchip/irq-mbigen.c @@ -327,7 +327,6 @@ static inline int mbigen_acpi_create_domain(struct platform_device *pdev, static int mbigen_device_probe(struct platform_device *pdev) { struct mbigen_device *mgn_chip; - struct resource *res; int err; mgn_chip = devm_kzalloc(&pdev->dev, sizeof(*mgn_chip), GFP_KERNEL); @@ -335,13 +334,7 @@ static int mbigen_device_probe(struct platform_device *pdev) return -ENOMEM; mgn_chip->pdev = pdev; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; - - mgn_chip->base = devm_ioremap(&pdev->dev, res->start, - resource_size(res)); + mgn_chip->base = devm_platform_ioremap_resource(pdev, 0); if (!mgn_chip->base) { dev_err(&pdev->dev, "failed to ioremap %pR\n", res); return -ENOMEM;