From patchwork Wed Jan 18 08:39: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: 45114 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2232826wrn; Wed, 18 Jan 2023 01:27:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXvu3jXpUt+ww/lwVuE68BJfy0BMPa3BU3efjRhho0EfHoX2PYLKC80EJef8yM803T5b1nGo X-Received: by 2002:aa7:868a:0:b0:58b:c59e:ddb4 with SMTP id d10-20020aa7868a000000b0058bc59eddb4mr7503183pfo.8.1674034066194; Wed, 18 Jan 2023 01:27:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674034066; cv=none; d=google.com; s=arc-20160816; b=aM2FtNcy2+OCFZ/IJp0LBaowO2B2W58tXH78M4145LCQjumOkx3upGKaaBane9okPo jId28B8rfrq7xouW0uUJTgJYMl++40Cw4mHzZJumw/IR8gEfWmQ89gU3KglCEV0kQm5Z h8NR4zCb+BGbgt8brus1s1D9Q/SpSzvaqVPZaEAFsz5p/vylWfcASY6Ulb6JOAW68YNH 5WgBUCkiS53IsSMtA2vcAo7n5g1goXZT03GPop8+nvkHGYd/KmoCkgLh3Mt8hW72qrNK dFU6j1+RzBJYU2iajeQ+21QSkoUhHSicc6pmiQW1Uk9WolWxpqREYLG4DpFd8VPfGFqv IzVw== 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=bBzdiUKR3Q3S6giAWwFvFyQzgosxxtJvFqkDRnSbq1Q=; b=s9U3gkjt4GfVwa89stIDqLeSt44o+xiFVVt0TMEqaH54OFJEPz23oQELCZ5NpKUQbY uoeinAmhYRNMpDmeMhhR2ZZwPMQ994tSTDRTvIw9B36ho6HKgIh0+Hp94hpt9ahjYRvl DnCQNX/fpk9+NBHo0hD+YW/UhiApNSn5FVnyMcRREr1jP2ErjD1dqHqhXiZaXqcZfmuT y2bErGFvmqHNbgxfPpSdOv1DMv3ZE51jXJoTArr4jspgn7JDpQ7Y17d3alpJ4xkgpaHQ dxiVb5j+1gsIKGJaj1VOst7YkyHIUnHJDUDpdgs3G7S0WbzVDlIXJR4BLr1YpQ1O/KlX oxdg== 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 eb9-20020a056a004c8900b005890a3045casi25931910pfb.107.2023.01.18.01.27.34; Wed, 18 Jan 2023 01:27:46 -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 S229874AbjARJYl (ORCPT + 99 others); Wed, 18 Jan 2023 04:24:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbjARJVE (ORCPT ); Wed, 18 Jan 2023 04:21:04 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6849B66ECA; Wed, 18 Jan 2023 00:39:44 -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 4NxfMM0lRvz8QrkZ; Wed, 18 Jan 2023 16:39:43 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 30I8dRJO069962; Wed, 18 Jan 2023 16:39:27 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 18 Jan 2023 16:39:30 +0800 (CST) Date: Wed, 18 Jan 2023 16:39:30 +0800 (CST) X-Zmail-TransId: 2af963c7b0427c311acd X-Mailer: Zmail v1.0 Message-ID: <202301181639300333679@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , Subject: =?utf-8?q?=5BPATCH=5D_thermal/drivers/rockchip=3A_Use=C2=A0devm=5Fp?= =?utf-8?q?latform=5Fget=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 30I8dRJO069962 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63C7B04F.000 by FangMail milter! X-FangMail-Envelope: 1674031183/4NxfMM0lRvz8QrkZ/63C7B04F.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63C7B04F.000/4NxfMM0lRvz8QrkZ 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?1755351945045665647?= X-GMAIL-MSGID: =?utf-8?q?1755351945045665647?= 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/thermal/rockchip_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index e567d80a889b..4b7c43f34d1a 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -1354,7 +1354,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct rockchip_thermal_data *thermal; const struct of_device_id *match; - struct resource *res; int irq; int i; int error; @@ -1378,8 +1377,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) if (!thermal->chip) return -EINVAL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - thermal->regs = devm_ioremap_resource(&pdev->dev, res); + thermal->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(thermal->regs)) return PTR_ERR(thermal->regs);