From patchwork Sat Jan 28 08:11:30 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: 49819 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1246573wrn; Sat, 28 Jan 2023 00:29:20 -0800 (PST) X-Google-Smtp-Source: AK7set+1vkoLSIPOtP48urKIKk35jwwbnCQMoNWryqNttlxSavlyhs9/Fhz5bPFrgr9O/9J+JY4S X-Received: by 2002:a17:902:e741:b0:196:167e:fd0b with SMTP id p1-20020a170902e74100b00196167efd0bmr20469190plf.61.1674894559753; Sat, 28 Jan 2023 00:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674894559; cv=none; d=google.com; s=arc-20160816; b=aM810EwKSzBCafjLZTULwmm8wKQz9R1OnqiSYiqzk+beoVN65E5g6qAgEb/vgl7cJA 6OuHY/F184oIXQ8iCvX/6BlnhCxTM6q1V9yB8AvE9zMxHquTRJpQkfTtngzPUphmk/1a WYom6DeHPgMVrgwdJrAS1ZCiWQ1OTDCtztRbuvSFmJ5CKbiEJdKxrx628Rp+Z04JPwt2 r2sDuOl5y/n8DbrC4+bzT5lFKGahAnK8nhhjR0fhhZd6t3Xe/MPXNxVwzZYoFcRWKPdu mfj3GZFMFC/j+Y32nI5TVsGGm9U+qQvl/JiHmwzRVl+irXMNi22ig16w/+wUMtokL4fk uI4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=l9jeXbsuUoLHgDquuse0nXUXXiZwnNdle86dnfVu7hA=; b=VRFBSL3rx+Y1HUVkCQDXPvxmqEWJrThWGWHTnD/TcvTNCjbg65uY85+8S/6da/jtaP RUirL1aiekkHT4l2ToCoVqx3QymnRh6QL6f+FDqLnkz1oA56nxt4hwPlP+dSt6kAWcax xkdKCPkBiZ2mn0q6mfhwPffIljaMcGj5Mm0CoQFVrXwTq+yXZrh4onannkicg8GRsDJl prWa/t9ZCp6GWe8hfoHUrKcd1RL1t5xnMwrlhzDMPsQWFISrVxLyQ4EFcyBvmXgXiwLU S2cI4C6ESS5ayrClgIfWJQ1Dkc99nZ5AWVKVxKXbEU2y8s0f8Q6xuCVsxPPYnAuPyzKm Z8uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i7-20020a17090332c700b0019110322bb9si7671754plr.247.2023.01.28.00.29.07; Sat, 28 Jan 2023 00:29:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233249AbjA1ILh (ORCPT + 99 others); Sat, 28 Jan 2023 03:11:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjA1ILg (ORCPT ); Sat, 28 Jan 2023 03:11:36 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10C25EB6C; Sat, 28 Jan 2023 00:11:35 -0800 (PST) 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 mxhk.zte.com.cn (FangMail) with ESMTPS id 4P3nGF5V6Lz8QrkZ; Sat, 28 Jan 2023 16:11:33 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 30S8BS95008465; Sat, 28 Jan 2023 16:11:28 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Sat, 28 Jan 2023 16:11:30 +0800 (CST) Date: Sat, 28 Jan 2023 16:11:30 +0800 (CST) X-Zmail-TransId: 2af963d4d8b2ffffffffb65b25e5 X-Mailer: Zmail v1.0 Message-ID: <202301281611305841413@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?q?=5BPATCH=5D_Input=3A_st-keyscan_-_Use=C2=A0devm=5Fplatfor?= =?utf-8?q?m=5Fget=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 30S8BS95008465 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63D4D8B5.001 by FangMail milter! X-FangMail-Envelope: 1674893493/4P3nGF5V6Lz8QrkZ/63D4D8B5.001/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63D4D8B5.001/4P3nGF5V6Lz8QrkZ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,T_SPF_PERMERROR,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756254237813169656?= X-GMAIL-MSGID: =?utf-8?q?1756254237813169656?= From: ye xingchen Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen --- drivers/input/keyboard/st-keyscan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c index 13735a5e8391..b6e83324f97a 100644 --- a/drivers/input/keyboard/st-keyscan.c +++ b/drivers/input/keyboard/st-keyscan.c @@ -125,7 +125,6 @@ static int keyscan_probe(struct platform_device *pdev) { struct st_keyscan *keypad_data; struct input_dev *input_dev; - struct resource *res; int error; if (!pdev->dev.of_node) { @@ -169,8 +168,7 @@ static int keyscan_probe(struct platform_device *pdev) input_set_drvdata(input_dev, keypad_data); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - keypad_data->base = devm_ioremap_resource(&pdev->dev, res); + keypad_data->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(keypad_data->base)) return PTR_ERR(keypad_data->base);