From patchwork Fri Feb 17 02:36:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 13144216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B992C636CC for ; Fri, 17 Feb 2023 02:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:Cc:To:From:Mime-Version: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=v4KNn6lfJz/iXujrSYkVuolpXBkQNiKQlHBSoTwe9Q4=; b=DR8 izA9y9Lie3SI1jSpKxcpJyL/4EtbS8KWM1ZPElERbt7/1MCY/nrkpVGgvFlMp+kEB8BdqUiqVRzUs Jn815a+UAfA0O+0YIfeE5IlkPvDAzMGhrRPqGQ07ZHSzmqfk4YTXlICKOTZ+XM8PAI6Ek7r3LA1Xm aMgdbZH6K8vjQqdP1aqR2LkXLYPvr9+w5c+8WENAha2zblrUJWNHOa3h11aSd85+DTC9a/pFmHw3S 3BHB6ZJ61SCI7908Qdk5mNYygsFS9+Rzs7Z+l9cYLPFcvvyt/hl4EZVS0l59yn0q/pvNVZuRoW8HO 3ubBZ5XAvRai+A3UppmZ7RrX9TQ4u5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSqd4-00CQ0q-74; Fri, 17 Feb 2023 02:37:42 +0000 Received: from mxct.zte.com.cn ([183.62.165.209]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSqd0-00CPyi-7X for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 02:37:40 +0000 Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4PHwvX3dZ1z501RH; Fri, 17 Feb 2023 10:37:28 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 31H2aap7094717; Fri, 17 Feb 2023 10:36:36 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Fri, 17 Feb 2023 10:36:37 +0800 (CST) Date: Fri, 17 Feb 2023 10:36:37 +0800 (CST) X-Zmail-TransId: 2af963eee835157bf665 X-Mailer: Zmail v1.0 Message-ID: <202302171036375639285@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , Subject: =?utf-8?q?=5BPATCH=5D_Input=3A_sun4i-lradc-keys_-_Use=C2=A0devm=5Fp?= =?utf-8?q?latform=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 31H2aap7094717 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63EEE868.001/4PHwvX3dZ1z501RH X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_183738_495938_66F03AA6 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ye Xingchen Convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Acked-by: Jernej Skrabec --- drivers/input/keyboard/sun4i-lradc-keys.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c index 15c15c0958b0..95d927cc8b7e 100644 --- a/drivers/input/keyboard/sun4i-lradc-keys.c +++ b/drivers/input/keyboard/sun4i-lradc-keys.c @@ -307,8 +307,7 @@ static int sun4i_lradc_probe(struct platform_device *pdev) input_set_drvdata(lradc->input, lradc); - lradc->base = devm_ioremap_resource(dev, - platform_get_resource(pdev, IORESOURCE_MEM, 0)); + lradc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(lradc->base)) return PTR_ERR(lradc->base);