From patchwork Thu Nov 17 06:07:24 2022 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: 21454 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp237169wrr; Wed, 16 Nov 2022 22:13:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf4g6csILhsAinfPVshU3AqmXFzTBA0Y82JqHfXN3R2iRdz5l3MqdlNeIwxupra4xZaHEaGz X-Received: by 2002:aa7:cc8d:0:b0:461:15f0:a574 with SMTP id p13-20020aa7cc8d000000b0046115f0a574mr893608edt.187.1668665633200; Wed, 16 Nov 2022 22:13:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668665633; cv=none; d=google.com; s=arc-20160816; b=BKgOXsnbk7wMY9jJRGxPqBcNzWhaGFD60+7FunOoXD0/yhLYmO7yaTyyyGYKcO3RQI 3Kx7ABWQOZIOLQ/2tEOyFoeh1rALwEKlBuHU5CbfL3wGDZUXKbdQflTnWiqC+jfIVWrC +I/LKSuVgwVCeFeE5aOp0ZTtnRF81txQtOM2iIdn5e7mFlVAN5gBZjbPPKLjdxmyZ8+9 iDfRTROqx2/vSzg588tSSUKsVkfVv4tO3LDhqCc+5oCP/JPjFdg631Q0M834goBk3QM5 +3bp5Z6/OXwGUdhoxIL2UpIiJ+vZlpMe5KOJfdFTlJqpE4qHr9hN6j8+bHFou/ty36OV JMXA== 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=Yp8iT72+2KiVWRsgHakT2XHmBOcmWvE3b0fXAKeIw8U=; b=SKIMg/QfUGyMYjxomNykpufc6o2q9NJAQydY/jREd7dnvpc2Z4iNg8ueC4242yjOlu Yar3Wu0qwfb8KDf2txByhAbd1udvI6/HcwxvWxRqhZQbFN1KbZOzsVz32Ylx+kLJXWxU erRss0ijLM3HjdxhWXiZoWcEVmi7ysv0kALoyU9FOs4+1KRzXDBWiZ6/HCl3KAzXTaYF uIAygE5frNof7D+L0VKBkAaXFm9SCcOaKnZr6i4j3N1lVqYnb9fDpVpNuVQlKKZ94w+2 Jhs6RDRUDq0povzDefh/YQPzywzKfzBY5WzirsnRbAL2z/wvSikkiW81A4WiI9g2u4MC 3wrw== 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 cx18-20020a05640222b200b0045cad599362si154395edb.530.2022.11.16.22.13.30; Wed, 16 Nov 2022 22:13:53 -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 S234229AbiKQGH4 (ORCPT + 99 others); Thu, 17 Nov 2022 01:07:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239321AbiKQGHm (ORCPT ); Thu, 17 Nov 2022 01:07:42 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D2CE27CED for ; Wed, 16 Nov 2022 22:07:34 -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 4NCTwP0Bbtz5BNS0; Thu, 17 Nov 2022 14:07:33 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AH67NQq084944; Thu, 17 Nov 2022 14:07:23 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Thu, 17 Nov 2022 14:07:24 +0800 (CST) Date: Thu, 17 Nov 2022 14:07:24 +0800 (CST) X-Zmail-TransId: 2af96375cf9cffffffffa124fe46 X-Mailer: Zmail v1.0 Message-ID: <202211171407248212856@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?q?=5BPATCH=5D_mfd=3A_fsl-imx25-tsadc=3A_use?= =?utf-8?q?_?= =?utf-8?q?_devm=5Fplatform=5Fget=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AH67NQq084944 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 6375CFA5.000 by FangMail milter! X-FangMail-Envelope: 1668665253/4NCTwP0Bbtz5BNS0/6375CFA5.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6375CFA5.000/4NCTwP0Bbtz5BNS0 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?1749722734974262684?= X-GMAIL-MSGID: =?utf-8?q?1749722734974262684?= From: Minghao Chi 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: Minghao Chi Signed-off-by: ye xingchen --- drivers/mfd/fsl-imx25-tsadc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c index 823595bcc9b7..089c2ce615b6 100644 --- a/drivers/mfd/fsl-imx25-tsadc.c +++ b/drivers/mfd/fsl-imx25-tsadc.c @@ -137,7 +137,6 @@ static int mx25_tsadc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mx25_tsadc *tsadc; - struct resource *res; int ret; void __iomem *iomem; @@ -145,8 +144,7 @@ static int mx25_tsadc_probe(struct platform_device *pdev) if (!tsadc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - iomem = devm_ioremap_resource(dev, res); + iomem = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(iomem)) return PTR_ERR(iomem);