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;