From patchwork Sat Jan 28 08:09:57 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: 49817 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1244850wrn; Sat, 28 Jan 2023 00:22:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXvr/JsG5gsMi2SQMe3BWF02zdR05t8m7NpZxwe7RVBAciR3ioTSKXn3HrPYwK7eikByaHJq X-Received: by 2002:a17:907:2a07:b0:86f:4a4e:4853 with SMTP id fd7-20020a1709072a0700b0086f4a4e4853mr37848531ejc.49.1674894125740; Sat, 28 Jan 2023 00:22:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674894125; cv=none; d=google.com; s=arc-20160816; b=n55BD0J92rzhXVboTjYIMmJ/sRvirRdDQJRqRDljuz37fMOQghR9kZ2IG8H2bO6mRN pnNXnrjEACTm4Zv+ML8olWCHTU1m/hEJu2EQ910lpj7qm2MdYXh3lb5w11zQqeioUQ1p ZEb1cMBawE5rkeoaMrQlWp/KtMHk5pDJf56OAeiAI7gHD0t7K7uA7/L6QZn1hG1uyIAY N8PEVv1gVlmyNN4V8/+PrkuJ6dCAMX7FIUA6oJYZZYg8YnCNxk4T4vtYZy0Cdd3oQYqz xvq/7jdGBHaWKRDabpqxMYwK9BJGHOBw4Aru12MRxMWWHe7HPyGE+EliKyd2dCVoMVed 2VKQ== 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=FsxCmIbOqovpaSVuva+Kcuycwqi2Db6yuArEJ1EUFZY=; b=kYmGJDG3fbAYJuf3gG1h7e9A7Z4uESQxJ8KAYrZOzDCE6rigZ8yC/JGVjgId3i2RG8 73OFYtC9smzz6lY1pSPprTSxXUPvtAsh22unChEEj79svWgdHsGoxllObNQ0S6n7lerk tbE5r/TCCwftWsyaDl5HZdQStHeO0Gw5r9GHs7z234UCVPPOCz59ZXCgxrwyRRtxarUy /9WAIZsoy5WvSWi0MF13nQcEl6SQNo7bk18UzRqY1zF9R5KR5hvHVIxGOIYUGk8RcSbr FCgubbMv0bq5WITtZCBwyW0DS2j8lBGaxRgiXzYXyiwwVIMoKgCbXs8eLqibBVOL48YC EmLA== 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 g7-20020a170906538700b0086b4343995bsi7866258ejo.629.2023.01.28.00.21.40; Sat, 28 Jan 2023 00:22:05 -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 S233544AbjA1IKI (ORCPT + 99 others); Sat, 28 Jan 2023 03:10:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjA1IKG (ORCPT ); Sat, 28 Jan 2023 03:10:06 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1D4AEB6C; Sat, 28 Jan 2023 00:10:05 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4P3nDW3VKGz501Qx; Sat, 28 Jan 2023 16:10:03 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl1.zte.com.cn with SMTP id 30S89t13012534; Sat, 28 Jan 2023 16:09:55 +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:09:57 +0800 (CST) Date: Sat, 28 Jan 2023 16:09:57 +0800 (CST) X-Zmail-TransId: 2af963d4d855ffffffff98fb0411 X-Mailer: Zmail v1.0 Message-ID: <202301281609576851394@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?q?=5BPATCH=5D_Input=3A_spear-keyboard_-_Use=C2=A0devm=5Fpla?= =?utf-8?q?tform=5Fget=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl1.zte.com.cn 30S89t13012534 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63D4D85B.001/4P3nDW3VKGz501Qx X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1756253782933998570?= X-GMAIL-MSGID: =?utf-8?q?1756253782933998570?= 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/spear-keyboard.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 4bb7c533147c..a50fa9915381 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -186,7 +186,6 @@ static int spear_kbd_probe(struct platform_device *pdev) const struct matrix_keymap_data *keymap = pdata ? pdata->keymap : NULL; struct spear_kbd *kbd; struct input_dev *input_dev; - struct resource *res; int irq; int error; @@ -219,8 +218,7 @@ static int spear_kbd_probe(struct platform_device *pdev) kbd->suspended_rate = pdata->suspended_rate; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - kbd->io_base = devm_ioremap_resource(&pdev->dev, res); + kbd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(kbd->io_base)) return PTR_ERR(kbd->io_base);