From patchwork Thu Apr 4 07:17:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 10885089 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 D09C2139A for ; Thu, 4 Apr 2019 07:18:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFE1A28901 for ; Thu, 4 Apr 2019 07:18:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A39B328992; Thu, 4 Apr 2019 07:18:13 +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 5889A28901 for ; Thu, 4 Apr 2019 07:18:13 +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=Bag543MnwJ3qCxHvW/T7rZMWjJon5DevIfhCjEomD4o=; b=nXzQPWAUMJijnwifR3UJ4RzY6r b01hvBnYyZOJWmjGu4ObGpSkR7YKSaUQhleQjnQ4X425ZOFUC2cRESStzef1C8QGyfUysB8E1WZcp i5kMKrv0v7fOXvDqMeZHLtDIK6eNqorIdr4Id2YHTWkjCaWqJyRs+VaWLNbXTiDjEsJGIXjgDVknx H0uzN9I3a74uLz/JSn/psUcS2LHuhZYC6j+kdPqyhNBv2FnJIaT6l8LNs0xKbvX7RuGVYtGMJ3/ZH bjddm8cMiFL5S3obo5hoxplGqc81jony0uY415b4sBMC769zkEbALcEB37Rr3/1yBRF95gczvUgmc djgQbtZA==; 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 1hBwdX-0003cO-Pw; Thu, 04 Apr 2019 07:18: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 1hBwdU-0003c4-Du for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 07:18:09 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 223CE6079C; Thu, 4 Apr 2019 07:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362288; bh=yKYPUn62ma6HL1VuWEXd+QduzyTtxeLAKCHyWFpD/sI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R1OnHkkY8zj492O2wFrer1Hywwu480F3whnVCHYnKYCeqzRTINzJqDGracAWw71gf PLZoVr1TsAfAULz3D/2PbYQTxISFO/5ep0Yxygp1opuYW4P0JLDazm4c/QafjF92p5 7jDxu9R9QiTh+1SG/JVVo2mTI8K62cKe+Iqs4iLo= 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 E7C16607C6; Thu, 4 Apr 2019 07:18:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362286; bh=yKYPUn62ma6HL1VuWEXd+QduzyTtxeLAKCHyWFpD/sI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OMeCFYInUzGbbeVJGd8qsoaXvk2Cb/F7+h8arhWjy4CfzaJDVJB4Xu12zKCwH85um e8Ap9DoaLrYJbYOJFevqUfEx9Ff3sXJIIGGCYtVtjEI8EsxxiPPZl0/34UV6OC8oFV 6GM6BRn7MGR7ZeGW1x/waTvqEsPVxXty3Rm2peAk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E7C16607C6 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 1/5] Input: fsl-imx25-tcq: Use devm_platform_ioremap_resource() Date: Thu, 4 Apr 2019 12:47:19 +0530 Message-Id: <1554362243-2888-2-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_001808_483890_A79F621E X-CRM114-Status: GOOD ( 11.00 ) 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/fsl-imx25-tcq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/fsl-imx25-tcq.c b/drivers/input/touchscreen/fsl-imx25-tcq.c index 1d6c8f4..b66df8a 100644 --- a/drivers/input/touchscreen/fsl-imx25-tcq.c +++ b/drivers/input/touchscreen/fsl-imx25-tcq.c @@ -503,7 +503,6 @@ static int mx25_tcq_probe(struct platform_device *pdev) struct input_dev *idev; struct mx25_tcq_priv *priv; struct mx25_tsadc *tsadc = dev_get_drvdata(dev->parent); - struct resource *res; void __iomem *mem; int error; @@ -512,8 +511,7 @@ static int mx25_tcq_probe(struct platform_device *pdev) return -ENOMEM; priv->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mem = devm_ioremap_resource(dev, res); + mem = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mem)) return PTR_ERR(mem); 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; From patchwork Thu Apr 4 07:17:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 10885141 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 B26A21669 for ; Thu, 4 Apr 2019 07:19:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E16528901 for ; Thu, 4 Apr 2019 07:19:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E25728992; Thu, 4 Apr 2019 07:19:08 +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 245D428901 for ; Thu, 4 Apr 2019 07:19:08 +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=iDIjbijTDiJVATwd7efrfEP0TiuWOaCL/A5z9tf6PLc=; b=ZBTZ4W88P66KUnEFfD5vz9SIu7 B6hiL7xeCGbVohWuSfNAj2MlYiw85d7uulfenY4HXg3sW4HtH6MM+FeBCYT5a+x8oz8YrBTSl21iU VOSCVZpiSy0mZn7wvhqOtu3/aGlQe/x4IWtJE/EuaaGcKCryFqM8ptY1dT5tIvktlRcxOnKFN+ajC O88q680zUSa9gBaB8F4EBGQjvZsiIme8UpQxVqwrKSsHjmFwlCKa5uvMMQ+YgSSieWQHpJTyASC5L A8yUZFar9HoCdQ00gQVQBBYUwqwD72IPH2AKNbOdXEt5roRJOQXZtXZrpFMy5z2B/we9XsrGzCff/ mhW1rzDA==; 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 1hBweO-0004ek-KE; Thu, 04 Apr 2019 07:19:04 +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 1hBwe5-0004Fv-T8 for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 07:18:50 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5A8D46141B; Thu, 4 Apr 2019 07:18:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362325; bh=slSFrSlYoHAmsXtoqq6LMfCj4JYQqHpuoI/eWuHfQrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oYW5A2tGSoujYyHB/jNJkpgMyseblyfr+Kzl7sp9RgZtrkjwQboFxJAnL9R8g6mHp MFfh2UwHxff7HfUcg4Ymw0ikPp5TkVEYvZDnW9iC9CNv5j8ej6iNungUhfdcKvYvKX j2FOdxfWD8s2Aqzy7kpC/h0W1z8U7DQV6AIhquVk= 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 346E5614B5; 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=1554362297; bh=slSFrSlYoHAmsXtoqq6LMfCj4JYQqHpuoI/eWuHfQrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lorf4Y27b6t3iR8KLz586dENDjbOlnK7mjUk6At4Vkssxx/Pg6ruicQfOvtcXposi Zj3JFpLOHquLvysT8h01rKjsJXZ0FCEzYUrGF7NCKQSyBfgsp31AT9BYybX4BNX9lF 4gAhanLKavHqf7kjF0F8oAEU3hbdVHKwh5EM8N7o= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 346E5614B5 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 3/5] Input: s3c2410_ts: Use devm_platform_ioremap_resource() Date: Thu, 4 Apr 2019 12:47:21 +0530 Message-Id: <1554362243-2888-4-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_001846_415431_93C550FE X-CRM114-Status: GOOD ( 13.11 ) 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/s3c2410_ts.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 1173890..e11cdae 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -242,7 +242,6 @@ static int s3c2410ts_probe(struct platform_device *pdev) struct s3c2410_ts_mach_info *info; struct device *dev = &pdev->dev; struct input_dev *input_dev; - struct resource *res; int ret = -EINVAL; /* Initialise input stuff */ @@ -277,14 +276,7 @@ static int s3c2410ts_probe(struct platform_device *pdev) goto err_clk; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "no resource for registers\n"); - ret = -ENOENT; - goto err_clk; - } - - ts.io = ioremap(res->start, resource_size(res)); + ts.io = devm_platform_ioremap_resource(pdev, 0); if (ts.io == NULL) { dev_err(dev, "cannot map registers\n"); ret = -ENOMEM; From patchwork Thu Apr 4 07:17:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 10885115 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 040F6139A for ; Thu, 4 Apr 2019 07:18:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D761928915 for ; Thu, 4 Apr 2019 07:18:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC13C289B4; Thu, 4 Apr 2019 07:18:42 +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 864DD28915 for ; Thu, 4 Apr 2019 07:18:42 +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=sIJIYEn8kLXROYDP0iWLqullaeriQXfaT/uWHWYYNig=; b=CqLJURb0NIRkjUUkZIjf4FqGyk gqtpcp9kq149BSGxIv5Ri5oxZ7otS0rpKYLRV/HaZzpMWS+q5IZyjtTvcaS5rkyt6JsUVjoPWcIf8 HBmWKTq1U3aDWS9OQgaMueBwq1ScWvYBwTZ+ClVgivYGavrq5fkJAEKsI9xUllZ65KSe9AO8XOTxa NtYza5JR2O+GgmW0/yxzU8ceqx3/GZAhgHnPY7bUTXfv9FZ4IUzOZUmAMV076OwPOi7LUhE+I8hV+ /SoVECHFlbcOuyyURPDpoKGQOzJ8FiJxze69w75QTdxTS8MLtl6fsYMd8MDeyrxOv/9MD3qUYVXUM pCBz2neg==; 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 1hBwe1-00049N-2A; Thu, 04 Apr 2019 07:18:41 +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 1hBwdx-00048P-QA for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 07:18:39 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7CD28614B5; Thu, 4 Apr 2019 07:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362317; bh=D5UNxLrC1aCufR9HttQTKtuFo+WmQLBmfJpT125xMxk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gHOlK7MTv5Aw1lZdT/WQpq/UlVzOGERh0LZ75aDRXw2chi7din0Etv/jbZijxO8+z VD97oHM8IbEw4uoED1UXBjze+aefobycS68x9xp1bsItuEiYAOQHYQ+Uc7hV+DeU5X ggMKu4/AcmaSJiO9adGWBtd/Y7SI2qvr7mSifY9Q= 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 3617C616B8; Thu, 4 Apr 2019 07:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362302; bh=D5UNxLrC1aCufR9HttQTKtuFo+WmQLBmfJpT125xMxk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bxKun/JT3U2V9LFA8vFST5kQ5QDXT+ebToF4p9ZzM3QJBa9tP3Zy2m+cW9EwjbISB OaD/vLZPi6Puk5JHAxskPjj6rKt5RoYlkTWx94BUE4kk4UzH8CYeMzC1cIg91/c7VU QPXnjQQZLOeRMp1RxM0Vv1u5VIWrwvV43gBu4Jmc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3617C616B8 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 4/5] Input: sun4i-ts: Use devm_platform_ioremap_resource() Date: Thu, 4 Apr 2019 12:47:22 +0530 Message-Id: <1554362243-2888-5-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_001837_884840_8C9BB26E X-CRM114-Status: GOOD ( 12.33 ) 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/sun4i-ts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index d2e14d9..bbb0104 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -309,8 +309,7 @@ static int sun4i_ts_probe(struct platform_device *pdev) input_set_drvdata(ts->input, ts); } - ts->base = devm_ioremap_resource(dev, - platform_get_resource(pdev, IORESOURCE_MEM, 0)); + ts->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ts->base)) return PTR_ERR(ts->base); From patchwork Thu Apr 4 07:17:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 10885127 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 576FD17EE for ; Thu, 4 Apr 2019 07:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3299228915 for ; Thu, 4 Apr 2019 07:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26E4228995; Thu, 4 Apr 2019 07:18:53 +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 C8B6328915 for ; Thu, 4 Apr 2019 07:18:52 +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=zQt00VNV189yZ+24HFfewiTdbPUOzDU4qzI/JFj8YPI=; b=d1SWcNt6RQiOMzJ0VaCEV+n3f1 K0h7HT0uCgsaXSiLChcCvTynbmRYvqHNZNNZ458CJRyzheJjdEcBexBxUd+IeCr9Gn3AYhS5fSGLE HMD0hY6bX2MqMQNDtuNvsq96IefZo1c9+kIwa6jh/TQmAMzqgNGyUlYSmmbmBKh+JjD3BvTJaN78e 76/2LUsvqTxsOAeKj6G025Pg3+YbgVRUVkf10nf+mogP5BpaZZQkLeAXfcJ+43GqvZdTMG66Qub6j 31/o3osrGU9OgnqReHf6g/NvzC0uLOlcc3PK87q22Ya0cTNQQhepvAFJTV99Z5yOBZlkfTJFO57NP NjzJ/gJw==; 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 1hBwe9-0004IW-Mr; Thu, 04 Apr 2019 07:18:49 +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 1hBwdz-000495-SC for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 07:18:41 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8A87F61790; Thu, 4 Apr 2019 07:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362319; bh=nTZbq6hRF5rjKUh0yPSlnzIEiAgFxyO93W+oBUyfSLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O8/GGKcNuGT1W8Shb9XCuL2thljzyB+JIleq3BS5/WoQJjLxnxK/D8iiSuUxjMRHB VVUgGVcFLhyALSFUNEfojdbdaJN3SHIF7bmp645eseIGyuhEjUZQ3ml+rzi96xbpBI YvBOxvNgJ6Pawo+IDx9h3tkvDPZeq98LPWDn48sg= 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 AADE36172D; Thu, 4 Apr 2019 07:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554362306; bh=nTZbq6hRF5rjKUh0yPSlnzIEiAgFxyO93W+oBUyfSLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GIRg5BTFsvAQ1/5eEFTqPmAF4HpFw61di2kzOl5Qt8zSgxKZGrreGC66G88wl3Zp0 M8c0zrN1DlwXZ0/2/LHGDX+v0A97ABuI/505KqJfpt5rzE02sch/nz+4Rs/gvK49dw +VMIYD6buOhBwVc04WgmujszKTnZhbr2gP2JuTWY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AADE36172D 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 5/5] Input: ts4800-ts: Use devm_platform_ioremap_resource() Date: Thu, 4 Apr 2019 12:47:23 +0530 Message-Id: <1554362243-2888-6-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_001839_937602_73E2F663 X-CRM114-Status: GOOD ( 11.16 ) 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/ts4800-ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/ts4800-ts.c b/drivers/input/touchscreen/ts4800-ts.c index fed73ee..5b4f536 100644 --- a/drivers/input/touchscreen/ts4800-ts.c +++ b/drivers/input/touchscreen/ts4800-ts.c @@ -148,7 +148,6 @@ static int ts4800_ts_probe(struct platform_device *pdev) { struct input_polled_dev *poll_dev; struct ts4800_ts *ts; - struct resource *res; int error; ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL); @@ -159,8 +158,7 @@ static int ts4800_ts_probe(struct platform_device *pdev) if (error) return error; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ts->base = devm_ioremap_resource(&pdev->dev, res); + ts->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ts->base)) return PTR_ERR(ts->base);