From patchwork Thu Apr 4 07:17:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 10885099 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 5830217EE for ; Thu, 4 Apr 2019 07:18:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 356A128901 for ; Thu, 4 Apr 2019 07:18:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2931028915; Thu, 4 Apr 2019 07:18:25 +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 CCA0D28995 for ; Thu, 4 Apr 2019 07:18:24 +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=T/C3lRQgHz2AE5XJHLp4HZnkbE1TcBoQZJVG/W5F10A=; b=M+2gFGx0yG/Jetq1+5+IEJKuyW xTVBSdyklHYd/miU1bv99HWpAfFBMB/65z99kTbMbnfptIo2OUCLI4rNmDLEkQ5lQn1pB7LzEW8xC +8+k4dCpr4Ebjkl8Nt5+J9w96yXadQDItkKqBhpyyfYLvewMS083mt+c8lW5GGOEF5wwTCKD8wWJP Y/H6awe4/51Zu2oM+VSzaOGgBotczaORKytk39NI2EQQqdAtCrs0gT1UzdPXSPuUi/pXP44/Y+MRA s9YUnw8Dfv6UekRB4WW8QgtBpQSK7Tz87n+Sj45NeUol+HGyQW0WUnISuvQJ0+aZazNhzRjip/joX B9dRItew==; 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 1hBwdj-0003qn-2L; Thu, 04 Apr 2019 07:18:23 +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 1hBwdb-0003iJ-Gf for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 07:18:20 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0C12B611FA; Thu, 4 Apr 2019 07:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362295; bh=3Pw1kQtwRp65A9eGD4hzWPNesktfZo1lAAMVELyXxsk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d+AIprOocf7+4/o8o2dV81s9xDkfgMyuy4YqvLDw08KvNXmUnq6rS2cXMtQRbv1L+ PMauwMDxW9X+TIqnz42uL98Xkh43yR4/Psh1f5ZH8Bkp5SWazKr5iI1IeV6HlaTXrF 9G63JR0zZFxXdPER+tjyj+pxCkIkm6xvykbteNjk= 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 56D0F60D0C; Thu, 4 Apr 2019 07:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362292; bh=3Pw1kQtwRp65A9eGD4hzWPNesktfZo1lAAMVELyXxsk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TxmJiGi9Kj3/gFvS9XAew0VK28o2/YtxjpWTRyGluk5jyrCXMvuZwX/N7Cq6F5nH0 lrpOAtx3+56Ju2nF/hZYdTYw4HBr/e6XyVlU8x4QiZbYXomZbcefsHx6xBL19X0KF9 HHHGYTvIBJYrd/ql4Mmz5OeaN0VUEJKbuSKmXBWQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 56D0F60D0C 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: dmitry.torokhov@gmail.com, shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] Input: mxs-lradc-ts.c: Use devm_platform_ioremap_resource() Date: Thu, 4 Apr 2019 12:47:20 +0530 Message-Id: <1554362243-2888-3-git-send-email-mojha@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554362243-2888-1-git-send-email-mojha@codeaurora.org> References: <1554362243-2888-1-git-send-email-mojha@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_001816_243193_AD51676C X-CRM114-Status: GOOD ( 11.51 ) 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/input/touchscreen/mxs-lradc-ts.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/mxs-lradc-ts.c b/drivers/input/touchscreen/mxs-lradc-ts.c index c850b51..af047fa 100644 --- a/drivers/input/touchscreen/mxs-lradc-ts.c +++ b/drivers/input/touchscreen/mxs-lradc-ts.c @@ -615,7 +615,6 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev) struct device_node *node = dev->parent->of_node; struct mxs_lradc *lradc = dev_get_drvdata(dev->parent); struct mxs_lradc_ts *ts; - struct resource *iores; int ret, irq, virq, i; u32 ts_wires = 0, adapt; @@ -629,10 +628,7 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev) ts->dev = dev; spin_lock_init(&ts->lock); - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!iores) - return -EINVAL; - ts->base = devm_ioremap(dev, iores->start, resource_size(iores)); + ts->base = devm_platform_ioremap_resource(pdev, 0); if (!ts->base) return -ENOMEM;