From patchwork Wed Feb 8 09:33:54 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: 54315 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3356762wrn; Wed, 8 Feb 2023 01:35:58 -0800 (PST) X-Google-Smtp-Source: AK7set9NERfIdqpTRe/OBeMkS+XvgN1QfFBN8yrmuabVk3RlLpCoP8BmridjiK+yV+oqNO0zA7/O X-Received: by 2002:a17:906:a18c:b0:88a:bb13:7329 with SMTP id s12-20020a170906a18c00b0088abb137329mr7171427ejy.53.1675848958117; Wed, 08 Feb 2023 01:35:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675848958; cv=none; d=google.com; s=arc-20160816; b=SApxWbrmXxWTXNRizIgTTUk86lZeaIoUv/oktyOCk3e5IdTQn5ZUuGyFA9yJJ3VKIy 9Dk3qRLN8rBcY8z2/qc2whMsZ5COd3ZYK7SqjkSox9nfXEcJA81WvBnlkIM/BBybGmaQ Cz7g1+1tGqrqxfwDJeG3sJ24+l+nm/pXKLgm6Ci5879jqQHVIAbQ7UFW5eSdCSXFNp3B lh7AP1sRuCDZMmpLr+KEmePHO0Zgv8IqnniJTFdeUfNRkKJeEzAedOhLH0+yPnPaKW2c ygHw1Lypju86g+SC4OTlY27PUtYBxPjxqPIcVt3XU2mm9VWsNgXSLwAtGdle1uhHG8eV WSog== 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=MKgVI654oKEzRCKH6hvF6U7OMZzUYjPCW3aPOuS5bbM=; b=mG9RReM9IiU6aatmwaws7j7O3V4UlrzQWQboTwK4tq02Ia4zA9SRqf8KMmEjZgw2p0 LIXyILS8FUfYRALwxvOY5xw8L+AyArk2KwqRpCnkDjf9NaD3OBkbgrkSOm46wW7PlcdQ Pfhv1MgTY7yrFIZUbMq7A6P5nioT1VsSWtK+QTXVyBGPFcg7DNJgSRfYCYT81bAgzn9j kFS+aBbgmFxQH4QEa/bP1v/GVMzAbzH8wCmZAHXKIIb+o338yZL/k/sOFcMmQ9hbs2mE vlPCt3cQ802nXY1IPyR54CqEZlhhuv50nCXoHNG7TNA8HHtJKPWqih46vWGMngtsN9Xq Je0g== 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 fg3-20020a1709069c4300b008890e939a9dsi16871592ejc.143.2023.02.08.01.35.35; Wed, 08 Feb 2023 01:35:58 -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 S229930AbjBHJep (ORCPT + 99 others); Wed, 8 Feb 2023 04:34:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbjBHJe3 (ORCPT ); Wed, 8 Feb 2023 04:34:29 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 065B15594 for ; Wed, 8 Feb 2023 01:34:08 -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 4PBZZM3ckwz4xq2B; Wed, 8 Feb 2023 17:34:03 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl1.zte.com.cn with SMTP id 3189Xp9I077427; Wed, 8 Feb 2023 17:33:51 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 8 Feb 2023 17:33:54 +0800 (CST) Date: Wed, 8 Feb 2023 17:33:54 +0800 (CST) X-Zmail-TransId: 2af963e36c821446d25d X-Mailer: Zmail v1.0 Message-ID: <202302081733542304522@zte.com.cn> Mime-Version: 1.0 From: To: Cc: Subject: =?utf-8?q?=5BPATCH=5D_mfd=3A_ipaq-micro=3A_use_devm=5Fplatform=5Fge?= =?utf-8?q?t=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl1.zte.com.cn 3189Xp9I077427 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E36C8B.001/4PBZZM3ckwz4xq2B X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,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?1757254997421806589?= X-GMAIL-MSGID: =?utf-8?q?1757254997421806589?= 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/mfd/ipaq-micro.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index 4cd5ecc72211..6d3968458e81 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -381,7 +381,6 @@ static int __maybe_unused micro_resume(struct device *dev) static int __init micro_probe(struct platform_device *pdev) { struct ipaq_micro *micro; - struct resource *res; int ret; int irq; @@ -391,8 +390,7 @@ static int __init micro_probe(struct platform_device *pdev) micro->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - micro->base = devm_ioremap_resource(&pdev->dev, res); + micro->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(micro->base)) return PTR_ERR(micro->base);