From patchwork Mon Jun 26 12:43:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 112937 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7466090vqr; Mon, 26 Jun 2023 06:04:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Yprta0C1xtjex8gNRVZzl8dBooETcgWYWEiXtAQgmwyNli91AYvOWye18v1p2EH94eS0l X-Received: by 2002:a05:6402:1614:b0:51d:927e:316f with SMTP id f20-20020a056402161400b0051d927e316fmr3678647edv.19.1687784661242; Mon, 26 Jun 2023 06:04:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687784661; cv=pass; d=google.com; s=arc-20160816; b=F62osrSxsMVT3F9XdIbVCQb0S/XwezGuYRSyJZEEHjcXZA/tLl2MKHuHuXlFEuN6zZ 6/W1sK4+6mgXwjCkcRbk0FrkTgK6o5ubNg2Z2+P9JbeDgorET4LhEdms6X0Ftnl+s5fn AtgRao/RGTLZymgD7vkOuE2bOJXsNSWFYyW0ozyEVyA1scBYueIxqFRpxWiDUhWmXJKi 9JSlmFtHG5KfyroCmnNXmaYXJiaPmdPozYkAMyCVuaThIovyVzoRrIXhQw3AZsSg1jco siBd3KvwQxNsWP1ZoepNUx7Bv+zb5h58Wnghtgynb0t3F2YamTIhy7BDeHd0UKQRM8+N CLRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=VxGTsAwncuXzWJKAN7hRxKXYlt1L21kJGv1I+pqlCXM=; fh=Jq0fGsVReHMaUQTK4IfaLLbqNqUu9imR9hjM7YG5g4Y=; b=obYd9S7I9V+brtWNhn1eTNOzj64xOgnECw1DvxwgAAdIsnVgSmIwUsywFgI3z3cttr pcoD0c2Au9RLpkVwn7JURwihnO7q9uviE7e05Ol8a/eFvBPqHGybfJLQQKyqd0ToW1C8 pbtvtG/GRVr6Q+LE4ijhR4Y9jzx9TnKyIAlR1EqmkUoY8sYIvqLDu2oG2ItlG9UHW1HE Hjeyaz9UdTG5qZPpCF07158Luf4WZrHBC3IhTNrRwFT6V1nSH3KC0EV3exd3v4yygK0C ZC2CoN2QNILR3kRm8413atx8/nrSS7K8XAEpBLmehNybPfPnueSd2zATy0+P6QdyGWEW tabw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WkYBm+21; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a056402000f00b005184a09e9basi2526653edu.601.2023.06.26.06.03.56; Mon, 26 Jun 2023 06:04:21 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WkYBm+21; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231223AbjFZMoN (ORCPT + 99 others); Mon, 26 Jun 2023 08:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbjFZMoI (ORCPT ); Mon, 26 Jun 2023 08:44:08 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2136.outbound.protection.outlook.com [40.107.117.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FA56E5F; Mon, 26 Jun 2023 05:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWJo4uYkbN4CBjiRNVhEPSrkmN3wFJcLsvgnFiF78GFyAMiHitPlGZkgpDUfBJ22+2HiOAJilJ4uIgn14E6t+6IvNL+lie7NTVK4VTsfPAuOTQPwUOqRHINWsHv8vKhyb75+rqkQ8jJ81+lZwfh07RcLG4iLAR7kkOR8zSa+Nq4DmV+3KJFG2SOcXNMqsHaidA11qE7uYCXms2T6iBSgCQlGUz/C66u31scJ5CVZdWmDrYpba7wVvZZyRGJku+3FcYDZQteU5pQAbjufKzo/FG2FlAkcCGVVuuqExw8s6BK+l67TNutqGcPdZH78U+sRnxxIds57HFFnSW9CPTT4fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VxGTsAwncuXzWJKAN7hRxKXYlt1L21kJGv1I+pqlCXM=; b=SvKOjXPyggxPVynRt5ezl55p7P31tHfuIWraR0pmCTIqujXac2bGTZDjZOs5kZ/C2esIcl9QwbIQTeiyRA1gXRRqK6xSbOXALv9F74lZgljnsPsQ3iqB7F3SNXJUnp3vElGWm3/QjoKDcoGCCp3bT0q15dHXLm3b6gjHpVpsGM7i6gOjby3pho2Z0DxUxqj3q2LvvGYiG6+GcBs4yCCZ9u8+8OWGD9OiV7sK6IxEUMdCjLgbzXpfU76VYgsHEGq3AhmO4zjiK8fbVBfFNkx2a6taZL0ZdGo0MpvNHwt8OeS0SQ5lZJllZ8CimZlgx4omdxDibb0kR16+GhfYTEaPiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VxGTsAwncuXzWJKAN7hRxKXYlt1L21kJGv1I+pqlCXM=; b=WkYBm+21N097RJy0yrSUV6d0SwpF0uBFXMdd8w7u0qo29YiWa/1Lm5Q3yZxDLF9OnYAdbvXDtFMDhq8fm6DtBifx2+npd1m4eFgMdZTuVV62pGF2NxzIx38oC22uqdDoJgMeQkgTCylwbh7uXOW5XgU83Z5Cp+SAM7R/UI8dRLFafOfnMiyzeY/Ndgsy8E/AphxvjE3XShs59CJHOJSKI43v3q07+x0mczg2+/duejSYdPiqwdkLBnPVSfLQHleJWcdptZuu+4JEKOOfPacuNi07a0HbnnsrVKOajvd+oKiH+4KCZpYT+nJkYoqstXTWKF9mJf0bsz0EAXnoy2LB/A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5320.apcprd06.prod.outlook.com (2603:1096:101:7f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 12:43:52 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6521.023; Mon, 26 Jun 2023 12:43:51 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] drivers/thermal/k3: Convert to devm_platform_ioremap_resource() Date: Mon, 26 Jun 2023 20:43:28 +0800 Message-Id: <20230626124334.15100-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5320:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c4d439f-6471-470b-aa4d-08db7642fe57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZpOregUXZooThNZJlvTgDQKDHZNWjSAIYKPAF90yOl0ehI+7jz8Qr145C4Uj1q/0hnMgceX3+QzCDqVTUq3TCfsyLPpstxraiKMK48svRRT/TP19tdgGzq7+wz0L99XJpFpwQ/eUtwQzSjJHitEQuF0tRYcj35F8Auz3+RHgiihnyaDLbZaatVmKHwTwjrOJJu1JkKyMebAzD7E9tLDuZd99bdLpRUQALIYrk68UEZSP+mmj766U8wDgtd34HuPjciS/mqb4zVkE/FrnNJiw/pK3j2flU9Rivxxv075mCFROB7xHjKC7h9xTs4hNP84yqW+4zclA8R88A4Lv3+xpSp6F7PJ8Wh5C3zet3kI2B0Iou1Ab8HnD5g7eKvuI1+4tUIvOF47ZQgMRpHbjm2aPTvVEIg0xo8XoQbny0BUKoULoEts20l6qlp+mCKOBz19wShT43/Y1ZoD/ptXEY2rPSvNRxbV+GMTT3bMFRN0JcZORN07EcF1St4ZxD8SyM1Y1JmVeXngJoJuPRJFqWxUnfSGaAgtn20q48k8HMd96d9/V4bE7o1Yw3iQyvw4FcswkfyEHf1Uw5b7p0je0Ie2rFzpVl2DTFNJK5z/LP3LTF4Kcxg0yVhA6cUu3EkoIaK38 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199021)(2906002)(4744005)(6486002)(52116002)(6666004)(38350700002)(38100700002)(83380400001)(2616005)(6512007)(26005)(186003)(41300700001)(110136005)(86362001)(478600001)(36756003)(66476007)(66556008)(4326008)(66946007)(316002)(6506007)(1076003)(5660300002)(8676002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MFYK302EK4pl+m0/9PfC8E6nrK/tLtzb+M6Ei6ng3KoXztFFeyNqt09o7FmZxXrCRzN6FZ6RhXksoUjeWaQ15r+dbaRMU3q2omWdwNyidZ8sQ5zcKmrurQpe/4T+wNVCdV3gunwtqEKnxgM/xJIu8zoQhxTVKRdec3cIZa/UFmuT+rYQQa2rpfC7cUsPHUYjgPkj9D6vTSITHMNCZRdLC38bsoSylVQITNxIqenTQha14Yy8NsJ12cbeKT4Us0bhgoxRO3W3D9nyYzHHpMW4Y3f9i7N+AQCC5DmJjq9JwdWcfF2D2EWvh9XXS2rvCztFhLUyVypQIQlt0ENxaq4mUnZi/QhDpTjkzWpgv957J+MJBHX9HBZSacFYeyCWnFr8EdGPYBGa2WANR4NtpJxwW/tpt+Pmn74UT4YdVuPqK6ASH+cEs2+8v5tKomjki5nCAGp65elkXAu79Oy9trIrjGNXqYpRo2kn8Q4JV2XYhIZx5R3BXCxFD8TqWez3xei1XCqySktNNlKF2Y4k3oiPs0zzSP1sHQ69L3v7Mui8WBb8BkRJG/ArIy7mbY67P8RyLG+uvu2pt/zqEOL3ej9SqcoGCnFIKhTqb89Ahq0/y9bJB47PiJzjTWjASz663ISezSjFUFGNqAcA8X8e0NN9eox9rJ2Bv6VSC447m3tyGWEa98rIwmcB6mQoPoMqfjEGbcptV8vxH4fDjS75s1BxrmpZLM0w4S48FL5JoLRlyq3/HVWPMoQAZuxXcLTycqdwFTpRuYtP/9jrGa/vTFZR6RzClr5y+X/J5WAcTav3SjyYGXMJT2vkxCtgJY/oMgDMUD7g44V7Al7F5idsevnJ24H72flTNqQy4ejzdhOatdk1MvvDzi2v02cTyc3SiEiQBtmB2LZq7yhcbEIIYioloaLuJgNTQqAkEctDOU9s7llPjr1n02gt2GFkle+hSkLMOtXPHfdFn0i4BE/PvCE0/79Uz5ojDJbWJHbXCop03L4GIKX5dHe0nGqAbjx81TK+fztBLOgjWRtpyAR1CrZhLIOBlJxWeO8KEZfPkvIo5uk8Z9vVEPONi7gUXREmbSvg7loLC6LHY6UCxzyVmJrY/jRTZKOrKOV0R/hoDPtKP+r4E4+bveFBjVHK4ocIiHDSAirxYZywFZ5iAsJm6tq288mw5+0F8UFIc9DLVQ7fhVFwtTDSphYi4WG74uZKpIvoOfiOBQ3BFxZ/RpmiUjOyreTwk02hvIEsuCd8TSakQM+1UqppEMhuo7h9Vh14Ad5fM5zAI46NktOn6DCs3Ly1CqlDQvPBUF/9WKJVJkVIZF08Sb0KyuYqWcMdI7shg9z5rs1N5ouLoruj4/nrW12gX2aO9fFLAYZSAyu5kjexoEa6W+sHSwdvXcoZ8+YMhXd+czip3Fm5XE2RefYQVTHXxINsKl6ihGfqUyOynXKvDUFSkNP83NGMGfGdGotstYN07vNLTwUcckAeZ4nUZkVm2HxLGDUAW3r9Acx7AB7kWXi4oESfZQCAH6TH0IosxAzleuupVtLWyW0ZIkq32gOl5ZaXVm2WsrKYzZDxlqq+NzSxYYwgwa7GGS4L4NMcxu9j X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c4d439f-6471-470b-aa4d-08db7642fe57 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 12:43:51.2602 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AUuahRRtJ2z3IcGWGeCqDCRwtbdCtnyl7/b7HqFB9p9IeF9hgwbx4mXaow6KXF+Z/BZ0y3NrRtnVeNIXmmJ27w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5320 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1769770489018592391?= X-GMAIL-MSGID: =?utf-8?q?1769770489018592391?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/thermal/k3_bandgap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c index 1c3e590157ec..dadb5d070455 100644 --- a/drivers/thermal/k3_bandgap.c +++ b/drivers/thermal/k3_bandgap.c @@ -160,7 +160,6 @@ static const struct of_device_id of_k3_bandgap_match[]; static int k3_bandgap_probe(struct platform_device *pdev) { int ret = 0, cnt, val, id; - struct resource *res; struct device *dev = &pdev->dev; struct k3_bandgap *bgp; struct k3_thermal_data *data; @@ -173,8 +172,7 @@ static int k3_bandgap_probe(struct platform_device *pdev) if (!bgp) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - bgp->base = devm_ioremap_resource(dev, res); + bgp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(bgp->base)) return PTR_ERR(bgp->base); From patchwork Mon Jun 26 12:43:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 112932 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7464320vqr; Mon, 26 Jun 2023 06:02:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ616qy17AyHNDIvoAU8yY2cScmijDnfHPJZltwr4876PfCuRgkpabnFIvd8Z3jLgpFgizKT X-Received: by 2002:a05:6512:32a1:b0:4f8:6ed2:9fe1 with SMTP id q1-20020a05651232a100b004f86ed29fe1mr13166813lfe.11.1687784549723; Mon, 26 Jun 2023 06:02:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687784549; cv=pass; d=google.com; s=arc-20160816; b=cSeFTGL/Z65HTQSw9WHXkuM+5VDGuK0u7vc7nNROodLDA56FC8bwrYv1aAXTKH9vV2 av+Bb6H0bzEz1ZYXWMjNzv/OcugkxUBqddxytmTVhUvERZJ9XngtluHqjMSNxonm8Byr WsOXKwhyr2udpJPmBQIH5QgdYban6JGWTNmKE/1Ci5PgrB1hRcFHyGj6lupvvSOW/QoJ r8+/AwclZ0T5d8Bt1+a+dJGli8AYTR38UL7pLImpRk6+MYzN7IVrk5ISvC5D59zJaSXy FhTDeKXQRpj/KdSYWYGZvCopGygvtplK/ZrDUHGctlZaeGnwvDuen+Wwk+x6RMWWyqYl Cu/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mvr6q5hIprXukXxxVQEtdkFdgv8kLCz1V0DLeMY6tvY=; fh=Jq0fGsVReHMaUQTK4IfaLLbqNqUu9imR9hjM7YG5g4Y=; b=rUmG3Ig0gJ1IRLw5gk1qiRdPbYvuLQm6An2lDvI//8Sr91eAwyXRV1gPrfm83DRZOO fRISTEHFQTjDBgBtU0fl9qtZJqeuO8F5JsgdXhHSsEJ06InfBR+DSzas+Z1BM6vN2VN9 s0oyAXedSDthE1YTqo+m5/tF5KzFFdRcLL7wnb9p/8C7MKC+ALKJrFYQ+94jRsqbFw6r 2UyEmMc397nDm63UuLbbM2cIcPtUzSfL4Tl2qr1UjjPTE7hg2J8BvxkyUROm8XOH5m1J LloCF08xofCWJJZTqEKfjJvjd2Ar985qPiTZjNoEFb0I8W/HZxXfRIxxCAF8uUvM4PaL lVFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=cEUkw8+k; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21-20020aa7c595000000b00516575b1ca4si2698069edq.38.2023.06.26.06.01.50; Mon, 26 Jun 2023 06:02:29 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=cEUkw8+k; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbjFZMoQ (ORCPT + 99 others); Mon, 26 Jun 2023 08:44:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231236AbjFZMoJ (ORCPT ); Mon, 26 Jun 2023 08:44:09 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2136.outbound.protection.outlook.com [40.107.117.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88627E7A; Mon, 26 Jun 2023 05:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eZBKAR46KuW3U9kIIsCu/037HzrcgTALiiGt4RD8XGOvwAOaePnSzMCn8k6fJlXI+ttCEuxOniidWS+yCxzynhEDZjHQV/NU70zfecEkjNeq31BWJVgW2tm201+4VndKqKgXLbwc3kE9iob3q+7ZhPnQSSJnrlWX50U6rdsUv6+UZtbgPFqSSJjvEDUFB538WKtm3k++M8TNkBjMAdfOFv8HObT82gqKY30KWm27LVnSr52Db0Aw03VxXlPkQ+jiBhJzKmMDLI9/IVhfcvovO6FQqgt6UTIciUPro0dwJjfnFKJYm4hs2CZHLO86xSyd9A6HZrhGDls+mBL0S7CXKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mvr6q5hIprXukXxxVQEtdkFdgv8kLCz1V0DLeMY6tvY=; b=e2WffHwSUUXUOANmUO+8Z+Tlg0KqRVMoTaMq/I3jzKOlX6ecPSXlrpGkmRBNbpOSj3dhb/JtJeYZuafPsIVrvtq9cLdKKlfEBYjSbUhOVRmLRgF0lJzQj2PBKzUbY/1ffo9R2RcT4wLYXTtgKPJLnd5rsy/s1mUPwcBDfSIJ1m4jQjsQqXB+zU4wBrWlY7O5SXW9yDByS2hIgrGpF1vM1PMfW8yIfO6Pa7qVTUcEH+fn6kYUAS9tV7d2xN98Zw7mqFNu6lP68eoPZlQ1/DtI6ADya4J+/8uj/HnWTvJtia4vEnpSCdc0mTBjiY+3xNzBuWzxztgum+32KHE/oumVvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mvr6q5hIprXukXxxVQEtdkFdgv8kLCz1V0DLeMY6tvY=; b=cEUkw8+kdnU8IQ5xRL+qW2ECiIZYSBZ/vH/Yc5CMgFwHVHsrQrN5zN2GZ9QKIkQAz3+rmgZlgZOpd3F2VydwPLN8r9dqfOPbmO7ICPPfrpS8tCvSS+rn0DD4DLo4DE4iYIHqwHqORC28EgtAGq994RFxOl9OjOEpcGiJLYWfiWM/sFmZqcIqoXytKYbnoVVyqEmRDZMumubhz1j2UINsi3xZ+TqqLW/TjGPo1Q5OpZXXwhPsYEpRbwVOj2bxvKa06hLRsWzj4qPpffuoXBQPfJryVPmVbrkFE2gBm3+T8Z8iwXjh34NQqE4/9qXmkyfva/nKzzRDA9CqQj+RtmFxlw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5320.apcprd06.prod.outlook.com (2603:1096:101:7f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 12:43:54 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6521.023; Mon, 26 Jun 2023 12:43:53 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] thermal/drivers/k3_j72xx_bandgap: Convert to devm_platform_ioremap_resource() Date: Mon, 26 Jun 2023 20:43:29 +0800 Message-Id: <20230626124334.15100-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230626124334.15100-1-frank.li@vivo.com> References: <20230626124334.15100-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5320:EE_ X-MS-Office365-Filtering-Correlation-Id: d9f91199-2b41-4ba0-33a4-08db7642fffb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qj+wInAYy/iMRpi5aZOAl7oHo9m18BiuVZta3iRv4U9y5DWoaHdpVNJ8rWLK/jGhcVxto2fvmr3HIHkEPHev9o0leHrQJHK/HYFrb1McdWwoMYTrwTU8NjN438l+7nIuvLBjo5HzUT8TKw9nS8vttQSMo2ZoHG+++bmBHebxGAvFh5Us5waQdzcusioIhgo31hxFxEkkDObml0MSRvLXqgxEIfn8yPht9NNKW3N7Xe4+ZWavEAxq8xsnT7oUO1IaCisDjLudHjsrHt+lE2Raf6mnWgwJSQkuFXn5P+yDimO/WLNqx62p5gLDbJbQhAwsvkAQwdy8QGqXs/O507vesAuAbI0vdIudEMpsd14PK2hndmxprUIJliIMMHJ1CLkCQBmZVosYCX4U765T3i3ODXuVa57zlVtM3aTFrzpz7oOQ2d+rV0I9D6gOi9jcB0aNqNYlnUytqipLKKGd2S3TJwBeoSqAUxXLCSCIgecRPgrYQmPbnSkGNUmU6a0cwIBr96oE3yAwqKjk+2c0uRuVN4cjiplkiLz3QNgXXNn+g0bYygFm9HH2r2ITUjwnnCy96UwSLPKdI5sLnkIerOtLzMzZ6oILD7SpqdmLArO1qfc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199021)(2906002)(6486002)(52116002)(6666004)(38350700002)(38100700002)(83380400001)(2616005)(6512007)(26005)(186003)(966005)(41300700001)(110136005)(86362001)(478600001)(36756003)(66476007)(66556008)(4326008)(66946007)(316002)(6506007)(1076003)(5660300002)(8676002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c3CsKWHmMh7UkxD5wO+iD6fhJOl2X5ItZKAInClJw8gAQNGGaMUV51I69QDcu4sSNn58N8R6FSMKgUrQzKuDhI1FrYnY4eTTd454lU53wyNN4OXpfGnBZWQijxTLhc33/Rx5qIVT6ovUugqBFoG389/2wQcLgHN+4e5KcrN11MveBFXs7cDtGohGVhgkrd7JcQXPnGH3Z0ogyTo5py4aAVi5h1ISh1mYyoxflbgNbQ9jqLSpdq8x+hB4lHMF0qIPZ8dnIMdtJ2+EL4I4MDOoI9WXgK3gkNvuNTxLVdKRRcgq3LXGN2v0eNKCHRJnAyZyZAcw+/wiMyaar+SJcU+og5zirE35mpId7HMIFVUi/+XMu8fXS+xHGeYgWb3cEzw8xlPLjqgKL8QgedCL/lt7QdIS+MMAhZaVzzO8dwL7wi0FXOefvUpOjOYLJiRvaVKTf63ruPqCj5agigvSxM0tUkMhTMqLV2p2FpuUuMGT+TbA8kmym8RbLn5en2X3CTva8A1pnGbMctTuGdJlwdPBh+BOUbohEYfOHNBoKMB0J82KTiCzMx1ZdYGX4MNO0YsdO2h8TGQudc+kttlk+RwYIvWgz6i73UEkD9mZiy1x9aC9laqYlIPUfZkWIei2xm/Of/BpH1Lix7XuWcJKvqsV6zRvp1msjkeTItzOhHekZdi7Acne84yJWZsI7EWGr9JiycMK7PrCYrv1j9W2/sVgwAhQiCa4KhFij4L0qcDrwD1hoFfmXA+JGKBSpxCbUKmj63YtcNDEjyYSOSn6f064+olgB7/a2H89JTdFGVh3pwd1Kcq6ERXNFWDU9O66V+6sVV7A8emoS5c4YSvRNUDgtRkWDc4Gm78F7VVHWkcyrwAb5pRhfdhPdF2lzyWOAYQEkl00una2vGVKhmU2l1niaEeudIeDpH3B+uCAZnm3DDOGA1YPeD6aRC5eh9H0+XI30EhIbQ9BssbKraUXf+Td7FBMhnc1zv5btQMMDhysnTKXK9HxXA7XENjX6hRwx39bK+5qqu36P7iTg92ULvjfFKhRpbJ14uXyXOM9CfYruNrSTnMAK6kOHyGXPQ+aGQPB2P8KqYvFi0ea0sOx0wr1aMWd5PeU+kgfmsv6KnPBLKilLwm9tMDIJ/FPmScT/yQFrNpWjHigSRHQ+zLVzor9GKhAeHCtVes7qqa0BohOFFruwr9O2BI/vEYzpxfIgm9wQEeVUGUysrh+12TIzM912CYmkpK5ezZbvVaJlWmdhWWCET7oeww3przskf7gh7zZTkRsUB+JynlYhBHs4rfx3Z2wnJ32JEFYh/N7gDNgfSPe8OmByjAn6tvo2x3Bu/WIJqYiakdhvh47+2F/G5yZaHHxtCQf/uq1Tle4ByJUJ/5FiN6fzI0tvLVJtHrqIJhcfE1nl/bOwAN3j+NwRq3M5zF3y0WEKUNgklsn/NetEGPWZyj1TedFpzGFBWa6YpyD3aekDBm8G4+4XdCoaFBcOcOEs1vh7CQV2MiXsbS+WAqr4LZd53fcLfi2LDwJBDS0uGN0alvSYCHVW01SvexRZSyM7zKAgLtDOU9nybz5wRC+3nfIYyl1SA+X5mnijaM+ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9f91199-2b41-4ba0-33a4-08db7642fffb X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 12:43:53.9451 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9Xx6FMhG254SP34cZ/V3rc2I2iCGup9FANcTETzxT9bJ4pdkSQus5FOUuEgF3ol01Eb1N+YgIHJF6pWALDSW5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5320 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1769770371907530857?= X-GMAIL-MSGID: =?utf-8?q?1769770371907530857?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/thermal/k3_j72xx_bandgap.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c index 5be1f09eeb2c..6c82b92d86fd 100644 --- a/drivers/thermal/k3_j72xx_bandgap.c +++ b/drivers/thermal/k3_j72xx_bandgap.c @@ -346,7 +346,6 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) { int ret = 0, cnt, val, id; int high_max, low_temp; - struct resource *res; struct device *dev = &pdev->dev; struct k3_j72xx_bandgap *bgp; struct k3_thermal_data *data; @@ -376,13 +375,11 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) return -ENOMEM; bgp->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - bgp->base = devm_ioremap_resource(dev, res); + bgp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(bgp->base)) return PTR_ERR(bgp->base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - bgp->cfg2_base = devm_ioremap_resource(dev, res); + bgp->cfg2_base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(bgp->cfg2_base)) return PTR_ERR(bgp->cfg2_base); @@ -400,8 +397,7 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) * https://www.ti.com/lit/er/sprz455c/sprz455c.pdf */ if (workaround_needed) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 2); - fuse_base = devm_ioremap_resource(dev, res); + fuse_base = devm_platform_ioremap_resource(pdev, 2); if (IS_ERR(fuse_base)) return PTR_ERR(fuse_base); From patchwork Mon Jun 26 12:43:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 112929 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7461500vqr; Mon, 26 Jun 2023 05:59:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+SRXX2z0Rxdmg1tOrIicMFfMHw+0/j+3FMzd5GlWVCLEvruc5jXAY+e5X4gGw3TfO0E0I X-Received: by 2002:a05:6a00:24c6:b0:66a:48db:8f6a with SMTP id d6-20020a056a0024c600b0066a48db8f6amr17977704pfv.12.1687784369406; Mon, 26 Jun 2023 05:59:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687784369; cv=pass; d=google.com; s=arc-20160816; b=tYJla5NNDYlcPHDZYHSOZeFCC9EeFdRxcdhLIl+y/LjsWRHrW+3c0yHanjHpZRwg9I tSFHcRrZ5dQ/kib+UB/oho35FAVgxH0Uw7SKYi++NUQM4JwTg2Y8WRMEgqGEJYR1WdsO 8FPgo1CsA78hsDR6G/4UIcj3yIpN/mVFklZoqGtjbNLEZuxRQHi/kmtYzE8C597TiWjQ BA4tJ7M+RI9KnbTDAxvpfbx7AGvycJa+eTQtalKlp5eVZOWl2UJiueJNUEZ7dUi7ISYR tWq3AaVdhTVSeOodbD50TeBeH9aY1vHHTzNDbRgNtaFvEToKxkCj9uWn1ETGdpxnRXtH MdhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NQRcx0nLfSmXxFDAULF/0+LbbiP8Ufj0ZtIsYfe8PZ8=; fh=i6jiH4mgiWWLVIF8dBVD76fKwWJ/Bl6Ml/IGrAaP3HA=; b=mu3Dzfb8oup33j7JaJIe/n0O+D4I6zYI+bbmFHqyixeZBqRoaVNqF1sQQmrQsTLiSe +dwO7Dpt2Ep82TXA30bBvBQVOeZz/CutEfjv5/9OUL6SsGuTxZP8R8rGK0G6x9bWZFEr AcJRwE4Rl9vhoi37BbCEI5jCrXeATnROFoOqFrYZtyc7YbNmW7Q98EhVBI8+hI0umli6 yKetGn3DuJx7UI2JdbzbR/LWg8SR1eNq7vRGSDGSzIQ6UWf17jQHtnQ8cZtvT+464sNk COADTrjVHcAYC0l4B2pCk4W7G7kQXMRI8/0+8QPZ+ZZslKsTiuX73GMTzlqaIUK/hNkc PidA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gyBPKfJt; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h70-20020a638349000000b005575419ff14si5290786pge.724.2023.06.26.05.59.16; Mon, 26 Jun 2023 05:59:29 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gyBPKfJt; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231329AbjFZMoT (ORCPT + 99 others); Mon, 26 Jun 2023 08:44:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231255AbjFZMoK (ORCPT ); Mon, 26 Jun 2023 08:44:10 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2136.outbound.protection.outlook.com [40.107.117.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7060210C1; Mon, 26 Jun 2023 05:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fEAUZUwmq6HfhgazEsFiTB45FzPzmIO/61nMN/qfZO4BY6q9I3ZrCNvUwuT5JnAOg4/PjuqpSWqxGLRUIxTGYrBv59dkstwVf0cNESz8i+qj5qR05SKauF12VoX4dhW9OrcsAde5CXaHBda5g9hGT4OU+E5rmOT8Wz9vn8uWjZ+dcw95z2agdYRWY7Ivw+aMITXPIpX74EpCj5xy54lgUvRKpA0G+Hi2CyVnJpTFw/2rcrjN0Z58T8xk/wQfiTNCgLoVUak52lvmboIYaHd9Qq7l5Mft1UQWLXi6R1BcY5kq++3CPl1hxj0hN2dZ5Jl6h+wMxEDBRQlmielLEetEwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NQRcx0nLfSmXxFDAULF/0+LbbiP8Ufj0ZtIsYfe8PZ8=; b=LCZOg0WUTlbnhoVrVXKjSZCGaqKVplnNDGs35t3QCbnhtpsvStK2KyqHu+NZeye6BYvcs0EamB/R4t0ckl9E4ICF7+wqLBT8lB7gea/EN16K+UAxvOKkIpOu+MT1gr8qH2puL2mbt8osqUYWpWBEwgq0JgfNbCpxW+LZr3ZuHWYMgVILtnshEnnfqDNAbTVCXlCLr+85vjOuL5ZnB3mv2KTlvDxCxUsnwtCJd7oWWPC1jFkPsNZw/pvagWn5Ig+X0IcodY/J6PU6y08DAuIh4HXeVcveeQtAXCqioeA6HOgmyYJQyecftfm6+Kz8nrPbzU8BFWJL/HlEsGiPs0Ru+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NQRcx0nLfSmXxFDAULF/0+LbbiP8Ufj0ZtIsYfe8PZ8=; b=gyBPKfJtGq6cbDotNlz6xADlHV7meZtZ397XyStxlWD1PLEvGES1hG3x6rErYGxQzJYHeMk4e0BHBixD9N3fqSqnC6AdysKhdJNsYSdxPJGviSDuUvkbeqFFCGsFqwLPDaS9bS67v8fnnHeL2SB+RMwKDjK4Wp6DqgmdFOwDe9wyice2bYYxGe8IGTAhy1eqZqqqZdDI4GL0lkj1+KmUBOdeSro1Vl96jHxro1E77sLqWDO1hRtnEm/R67DR0o+JwW9n2dMnJkcSO65pzoG7sEA+Yhkjnn1HI33uTWmQdKFaV0kEnV1HgwPR38KtbI/obKkczP75nNrLuFYMBbhcfw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5320.apcprd06.prod.outlook.com (2603:1096:101:7f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 12:43:57 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6521.023; Mon, 26 Jun 2023 12:43:57 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Amit Kucheria , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui Cc: Yangtao Li , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] thermal/drivers/qcom: Convert to devm_platform_ioremap_resource() Date: Mon, 26 Jun 2023 20:43:30 +0800 Message-Id: <20230626124334.15100-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230626124334.15100-1-frank.li@vivo.com> References: <20230626124334.15100-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5320:EE_ X-MS-Office365-Filtering-Correlation-Id: 01553e32-7c29-44be-63b9-08db7643020c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eGNU1PW+k7kXnNjI/wfqY7zbF9qZvDMJUg9EdCm9QrXcOvifd9jI6tPgPvk32BcfR3Bck7chc2JBZk2NtomRQV6MwdjcySmRm5YxWUJPjuC2Xi15jRhPIWZ8RuLup6axf0PK7ixSCKmiOljMF46IfNaptFy99dse6o1N2OSPiZ5nJKS49uFpD+qO4B+ySd/2zke+kasZRPK5EDkxAI0WG2mo1HCe6UP9scsGD5h66ILw05yxRPcEG/enuQ5CFmc4X/IrayetVuKEcgZ1SO2kWWAa/r4RRnX+8JrSfjfhLRPOvt4E/NNm/bxy6Tz1CJ5OJk/Wcl3kes/kReB0OnTmNTvHGrglnC0ls/hzkrIjfCSkOocOAUErJ/cGMmT4K0FRK5JswAVyN6EfNIo/7+RbwjyW+mJNICUmJr1dC/q03neLgTcI5pXbhSq5nMU9uG/SDffPlGhkRckJY3X5tBQ88t/TWYS5mXLnWemJrx1P51qbAvjSA1cPUeuTsUIutsdcaTCgrpbHidgNWBdM1L/LvXGfX2qt6RbUd85rNWBLeKSt2f66oQVKP3HXbwGDquqJDKDiMv7eLMzhJ71kB7NnnpDwnnMHNzMKAzGqEYEdi453AAZ+5qaKCqitIYDtbIzM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199021)(2906002)(6486002)(52116002)(6666004)(38350700002)(38100700002)(83380400001)(2616005)(6512007)(26005)(186003)(41300700001)(110136005)(86362001)(478600001)(36756003)(66476007)(66556008)(4326008)(66946007)(316002)(6506007)(1076003)(7416002)(5660300002)(8676002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +xUrrJebIMm5NRuTHzwCd9iutV6COjsgpoULtAtcLTBrBU5Bq4K3B8BzmZBN3mzI1MbXL0ywXNQgrv/SXcS1vA8O72gTZBYiG9L4e0S7tz5sJrDSe+l0l+Aypu6HvvBoumobNfaes+I06nJFPtXHpyuUS5YIlg5sxCx0yTWfBdJPz3V/kxGfOyTwXb/EzZdWXMLFF+ETi64m7wOuFM+BvfZcNjlucFYmffX99k6INWqQ1bVCXCHar+3OiIOt78Y4qt0xwJhh+fAtHhlEAN1V1omYN3RpK95W7QbKsRtL8opxLHpJ4FDyFhCP/r1OCDvC72cekV5IP7qSQjfAmY/9qu/eLnxzxx38s8OelzG/iO0l0IV29ijTW0URRWMHnvQeO7wDP6GCWkq4CEgAac6gYOcWq0fPOKD6M6AFAsf7KRG+r0Pr9ewZFEtFQCpT8LTtu0Cc+CYjOwauyca/QOqzJH0qJycGbBp4MXv90zPhYA6jw6GgYFkxEPTXCTrd79dhj3jkUtAmXIv0Di+KunJse6I7KbJNVc2b30IDjPnWmLSZya0PrYxCZUYVX47c/yfbAdtef5tEtvrzWnevkBtxi9rtTRk5qyaI/zptJoAbiSY7D96LnJ+ewrFY7EC5enmG8oFQUWHhX4yqIXn3LTPcZh2KXxRQGD0D4MHUOSW11kAY2tjOzRHA+FIR+Y0uDiAfVBQlfXthCsjoEZ8a7jU4RIAklxd7uEevEdeiibkzZ/6JmdFK/t5VoTQB1JlvJPjNKF76jyqKQDDgisxXEhWTTDiRsQZqBjIOJiLjqIketz117izled72cF/WBFzxkfqlXKuaeigyh90Tfxam8L6kDkkk268lOBBPvknp47pUO9pzbU1eSZIPtiaxYvHH+H4hCM42WIRUVT1dTl98yXVI1IfRPGUhgWMDgRfK/gezB1UcEYhxZGI368fB/vzuaC+dCn84kHhVMudDzc7LyM0a4iQVGGi76993z+gP1gdYGB6/UOIkdivQYHCRq9exMpnYpsD3KNYK5WNmmMJkeP9T0m9Cg/rDhQ1lZVJi5jjgj/q/crIIrMh2uCKdGg9FRJI8/rV5fPRU71EYTL0WCsWDQU6aQ4hcMQQ787nMdnRZ1Hd6f3/7qgy9hWN6zGoGT/eR6g/8Ar6iXhIVMCYo6KdlswBg4mYnZhkMKBkKq3Ds25xnoDWWf2rJMqLawUHd+F+phmnGfCKK0MQp20k+VgV6JEIRhnqV2K5KyScBCJr2wl5XfypJ+NetY+ZDF5Q62iXiyrLXCHX8Qb2QbKn7EbJgEKqkK33eP0DPS1Almgu1K3PgVKn56lbhCm6TIqjMAF63oorMY/vNvS3gAnyDBpCMumkby0sdk4iOj/QG9VvPuDLX4bKWGaHHu85frnmKRdcXfpwoa1YNBxuN6FXFzl089HepBip8n+PVOZ16sX6g1WpyjHYcgnHJeca9epPKRhypOApLrusklh+stzd4tOFsJaPZhPLx0oOJYLbDeurdRMEerwDsyHtGPxg6HA09tx7x2u1VZMkU/DFm/gYOYv2So1LA5SGVsgwlzVgChK2BH0tYyeZDa97X/thA4LxlKQHr X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01553e32-7c29-44be-63b9-08db7643020c X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 12:43:57.4155 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7X/UO5nNMePnUzIT+FOQag1B3C5IVU0+wmHizyrLCqFZtv3+C+ot5nAim7jL7kEjrbWtWJM/6snfqGzSUEwihg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5320 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1769770182693629365?= X-GMAIL-MSGID: =?utf-8?q?1769770182693629365?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/thermal/qcom/tsens.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 98c356acfe98..f2e67adcf4ee 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -890,7 +890,6 @@ int __init init_common(struct tsens_priv *priv) void __iomem *tm_base, *srot_base; struct device *dev = priv->dev; u32 ver_minor; - struct resource *res; u32 enabled; int ret, i, j; struct platform_device *op = of_find_device_by_node(priv->dev->of_node); @@ -901,8 +900,7 @@ int __init init_common(struct tsens_priv *priv) if (op->num_resources > 1) { /* DT with separate SROT and TM address space */ priv->tm_offset = 0; - res = platform_get_resource(op, IORESOURCE_MEM, 1); - srot_base = devm_ioremap_resource(dev, res); + srot_base = devm_platform_ioremap_resource(op, 1); if (IS_ERR(srot_base)) { ret = PTR_ERR(srot_base); goto err_put_device; @@ -920,8 +918,7 @@ int __init init_common(struct tsens_priv *priv) } if (tsens_version(priv) >= VER_0_1) { - res = platform_get_resource(op, IORESOURCE_MEM, 0); - tm_base = devm_ioremap_resource(dev, res); + tm_base = devm_platform_ioremap_resource(op, 0); if (IS_ERR(tm_base)) { ret = PTR_ERR(tm_base); goto err_put_device; From patchwork Mon Jun 26 12:43:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 112939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7467253vqr; Mon, 26 Jun 2023 06:05:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ECFiR36+r87duLPlMRUx6WHj8yV3pmsx8PN5vPOg6MompBSDFs5k6vZYj58WS8DAZsuKt X-Received: by 2002:a17:907:970f:b0:990:27e2:7f81 with SMTP id jg15-20020a170907970f00b0099027e27f81mr3256878ejc.31.1687784745687; Mon, 26 Jun 2023 06:05:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687784745; cv=pass; d=google.com; s=arc-20160816; b=mD5wLlHHf2ISaSARCTT65is6d4Pu7sstG5IXXynxbL0zHO5dE42AQwi2+RGCQuhzRV 68sz47lgy0qeDGKDO6I5f+1S0YtKRYat2jUW8vsxzOHi15AYRzz83oG9mLxD5Vxc4TlA Hpbv2pzVV1qOyLPiUNoMAyz1iTjuQ7kjvjBHKl2+uB8HxoGRfOOqjSVRqFfRS1/0fN8U nytAEqiaE39lCOLTlGnWpH/+7kBKmAXq0CeZ8NytMb89paWqgqWbtRfKCZwS+UwRmCVU ov3JyJBvFpQnNON69C8YUaj3Tjyy46ApiivkzJvsmXq2Q2gcC7rVrS2HKEIOt3JVe0CU y5iQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/Q8iWy4Ib3U9fQybucQ9dbTjbgZldNv/RPDvTadx198=; fh=fuE7B8ip+UuRYp/yeCOPrX8hhnGv4MRUxcm2DDHYPRA=; b=XokjKUB1dzlH00PwHz4Gu0cB1RN8Aj+tIfFrP0yXxX/KqvwApYAQiIBzvrycR0i396 a6rZ5yK1OmXE4jCqqdRn2npxeh8jWP5KzmdnZPLORi+R29pQiQoq0JSP4u1Xya5sT8d3 mypidfIUusOb0wf3dT36/0DrjAWE8W0sp/gLTY366DtwcEk7eGgP+5/3rkH4FTksbAvq 1EVy8txoOT+j9zsKfu8H7HDmuNhd3KQJQGiBXQLrxodwO4YASL089Cn3MpBF0KOtKb62 +BA6MhUPfJ8AacJDIenX0n2OqV4eaLd2WF4I7Aq0rW7I9JvBUIveKyw60cOSwJ4NxZe3 fw5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HqaN2b28; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dv5-20020a170906b80500b0098d73b25019si2585983ejb.724.2023.06.26.06.05.21; Mon, 26 Jun 2023 06:05:45 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HqaN2b28; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230454AbjFZMoY (ORCPT + 99 others); Mon, 26 Jun 2023 08:44:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbjFZMoK (ORCPT ); Mon, 26 Jun 2023 08:44:10 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2136.outbound.protection.outlook.com [40.107.117.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C5C010C4; Mon, 26 Jun 2023 05:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PtC+yvw7SD5A9waJYhYc8ayxC0CwKLv/Xnat427dBrvfB81vMMRuszHyXL3oZvQQ4Q05HGbLvzWZo6VGCLbt67HpF3xqozLfZBH3pdJe2Y6nDqkrKQqcEAm3OVW7H502EXF44cgKEoTk2OE8rbi4oULxeLe6XwdBbIj4ZFSFfbDCkGDYXozurXPbcNMgvJei6u2zrtNHm0La3WS4uIYH21uBBabZIC+rwaa3kVD/KHz/0bgDkKlt2ZPMpcLRrh2SneYQRBwD+D72vsbfcT7N0kVh0WQTtySW/iTfOh1h+Ocmila/c8Z2FTtZzqhh98pQguKjRhVM1hdEur10QhUsWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/Q8iWy4Ib3U9fQybucQ9dbTjbgZldNv/RPDvTadx198=; b=VOu+Pin+0pdicaMsomTF7DeXajNc9gbQ25CCFRdEQAPpFpfQ2MtaKo9EcCg1Z+UlegvcRpR/r2gyWVU7MtmVj7R70+kN2XVX6K8Ht0as6i2iEEBrujXkub7uupn9/8qXVAZzjkHeDJRcFQ/LcBaj8I7EGafun/J8NXGf5hUclJec7OlcnI2LwkOYSxUHE+iqgIA/vW0P6YI6PDWE3u8uW3um8pwoi1aos7XvWu5vPATOI1AFEke5r/VLsI1+HYYlGiY5f8wo4ksnXzvN81/SgFjzY9dDdvwHwkRDeLggyglKf5OQY34Z9r4J5PIokPa3DpUiX0vh386pEouZyxZY3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/Q8iWy4Ib3U9fQybucQ9dbTjbgZldNv/RPDvTadx198=; b=HqaN2b28vO9Fm7EoVIAhEWCOe437bGQE253SVjRgGYf4zMbAK+0LOPyyajSd61ame+kOQWv3Mb01QC5uzIFy1e/C4lWO9e/2dHESpSJME8gjOzlmuCqxLZ4BJXvoPwE08DFmY7DA8El9XwwaRie7PSuFIBsLynnRYq+JUwnmAUUW0+I7mLwPNIFJqm7Z4x+edqZMiPwS7d488GpgCpf4NOOLa7qUSeaTeAtuwSKuTKvFEwbvapTIAB8TxitcTagtBhcvR61VSbzPODQgNmGzwYzhXkZ+1gcKUWTqtwtz1Jgr01KPv2LhmXopEnoJXyHgZ7VrQpym2iZC0vQyeBN9ZQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5320.apcprd06.prod.outlook.com (2603:1096:101:7f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 12:44:00 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6521.023; Mon, 26 Jun 2023 12:44:00 +0000 From: Yangtao Li To: =?utf-8?q?Niklas_S=C3=B6derlund?= , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] drivers/thermal/rcar_gen3_thermal: Convert to devm_platform_ioremap_resource() Date: Mon, 26 Jun 2023 20:43:31 +0800 Message-Id: <20230626124334.15100-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230626124334.15100-1-frank.li@vivo.com> References: <20230626124334.15100-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5320:EE_ X-MS-Office365-Filtering-Correlation-Id: 27489156-4d24-4c9e-7328-08db764303d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /bbTi5fW2TdZinTdde+aWlqL+WIafBttX+ShsucPbP+UqRZ7AezNo80sv4ud9jb82z2BhbelVLGSZyFJtCeTdkQqL8z85lhenyYRitWG2CphZJLlzIF9lQplf/0EeXXR+zr7xdcpxJuzkGganFMZd4lPpLbhhrvWsnzgltgOIxFxrS2GIDx/JtyqB87ueNGx2tnAy5w564mN+ZxzWvRdQLViqLY9pq+i37Ny7qZseVzGVSKEAT2bWhPtWS8uxaIysyXHRJGCszq/+OiNPYBR0ObGRhEXRejEqzlTVYl/IetKccLel6b57EXmCnK2axatOse9VaDNQH6IFr97dQUEO1Gr3axqW2JLXsfAXl1gqpeAadB/CaZeKUJ7q3GozDqx+5Y7PWXvD7Co3UrLPcuNbaLxtzqcBdZ2DIFLtm2L89Av8nXIDGeoBdY49DC0ZudRSgk1RPC/MRu4uwLc1PklyH2th21CB75MrsnN5DsJhQAAyZ0d2Wdgd7iWtzLpBx7OuAeTxykJ+9ut8nSpw3O3pVP32YdsVvVTL2iIxX4m1Q7KmxfetTzJNkBHNXYbosmsJbJMYpqW0jy6Q9YJ/PP7zB4dQdsg2dUWJtUx3Xcw+n8oVqz5YYDGbAHpbgCzl4dA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199021)(2906002)(6486002)(52116002)(6666004)(38350700002)(38100700002)(83380400001)(2616005)(6512007)(26005)(186003)(41300700001)(110136005)(86362001)(478600001)(36756003)(66476007)(66556008)(4326008)(66946007)(316002)(6506007)(1076003)(5660300002)(8676002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5tJw2FOGln0Tu2E/BYd1wBy0HCBSBFfWIxoP6aE1fgweFtjJL1/SeRZkfDWNOLRX0pqVk5lqbnAZXsfD9PC0zxHeNXdU0OfyOIGYixyX6X3WOhB67kxoOklOWP/NsMlJ2uc4hCwuRGTtLmAowH8xLKvhZ6ngWe4W0gdcNRytTEdnWwnU8dM5CvBnvEK8mpKErc8H7kfDCeYQSwJTUumIY4Cn53IhsRx8nRifRZzP00bQe/T6hMg9QI4rl3wUsHObYCwtCyYt00Sbmg0APw7W6yd+njqi3iYzbTIy8gciBnELqyr3/LUVJLuHqoWHPx08PV7HAG6oqyDK7OI3jmImA6b1fDrM1WQDAZ4pCPXwxJUIjj7CT/rI+XfZxumvevkUowfLh6znEii/cXvp84XhgnkPdS9UR7WFDsP3O/A6EYHAkPBp8xsruAB4t1tCtuvZz9UDH+uKAWyLDbD9kWepyCgBII3ut9Ai01oc8Efj6aSKSU+29yvl3fpvm4R0eJ00cly+7QfII3LFwl3VRK3HVcfo1tMClePsPIYtxY78VUTjzO0HkUCDsX4Jf5HHKXEopu7OrUFhdLDKUVv5SpmvKX9dRSTw7cXtu4DP/PsWNMYwlZunD9tyzIxuVWvQz1TLf2oPqmpozZM+S9dxB7MYV/G5LstKKP+y9qDkHqhstLaGyGfVTtQGoUVq0Hqr8DPxwy87NL0t/HBtLwFcDeSw8k2/EAfoVlo5AeL1uonqtC8HOtEoK0uzzjzNHSU4IykjApqiWq9xgNTBhR7Z1VSaVsj4v1VJcfvA4CiLZT5zTypkvHMxXSGKWNcyKbrZ9jv7OJASHzl5NOt1uwEJAcJLmmvxRty5y3zLNR4/ETPyUmYhDRGOPTabAkE5a7OEihFYoZ/V6ccu1/lK1paatAVK8MXOeX0Fs/CbIPztPGy7JhS2z/RkDDln954ZIpX/dGIobGD8da4h8kFH3notZ+lI24DOScJd4pPjyTuWneTesT4l63coPdVdc35/bZRiSP+ETos/c0/FQcc4H1hM8jQGcOnKRzWKVpB5nJlsCNbpqF0zoB5MVr3aY9GaSd3//6M3Rq14/xDoTWfnstUJj/0VbC1mTMzFTQQOwiktj/IzEp4XCtaA6vXxHnO2prgtUyZDrG3HoZJgVIl9JLii1Xl59CLaKhnqXGSNw13ZR4bz1LM+PJapexcfrxcMaqJ+ry/ZEbA4zXwnE0W91Na0dUPS4NVUtMu7vXr+2lvWXS+DtBZzJKKjNAIoHcoBzuFQqqcJZhQw2f0m+plkAvsWErcqLtvqnvukzvbaNehGXXtefHaacGyEei8JBD0LjhI1QQ60dZRUvjDu0PPCxcc2q6gOwbtSgZMRiVh64s848ivX29ppOLdvOd1kLEzRiMioyLUdB3Th04hvSlaaXmN2FL1zWSMGLnshdvkiIj3ewreBTisDAUXvUR8M5/8VZobiawhUb5Bw8ohvscqqguxPDn1tTj5pC0xczR2XBiYzKA9ysfwpEkQSoMumj7ZOnUYUd+OEC2uQ0pkwMy13Ejy5iFBYKQYHRQb06aOgEkTMQoaeDUgdqniyF+3Kx85kCzvGQNZ8 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27489156-4d24-4c9e-7328-08db764303d8 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 12:44:00.4568 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OxfdeJE1sSYix3VZSz9vDMfZvlJk31sWopWFfIK49eDxbIr2YVuij69t/7s27Kn0e4Jn219l+CJ/dfTonCPr0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5320 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1769770577278469944?= X-GMAIL-MSGID: =?utf-8?q?1769770577278469944?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Nacked-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 9029d01e029b..5c623f13d9ec 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -481,7 +481,6 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) { struct rcar_gen3_thermal_priv *priv; struct device *dev = &pdev->dev; - struct resource *res; struct thermal_zone_device *zone; unsigned int i; int ret; @@ -504,17 +503,13 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) for (i = 0; i < TSC_MAX_NUM; i++) { struct rcar_gen3_thermal_tsc *tsc; - res = platform_get_resource(pdev, IORESOURCE_MEM, i); - if (!res) - break; - tsc = devm_kzalloc(dev, sizeof(*tsc), GFP_KERNEL); if (!tsc) { ret = -ENOMEM; goto error_unregister; } - tsc->base = devm_ioremap_resource(dev, res); + tsc->base = devm_platform_ioremap_resource(pdev, i); if (IS_ERR(tsc->base)) { ret = PTR_ERR(tsc->base); goto error_unregister; From patchwork Mon Jun 26 12:43:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 112938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7467002vqr; Mon, 26 Jun 2023 06:05:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Nv0h6jB9BUeQGAOoDTYP08jeVgNy9I82wgqsBc2vtivnssihbzBs3SnAB4OT3+juMufUF X-Received: by 2002:aa7:cb84:0:b0:518:7a8b:5d4 with SMTP id r4-20020aa7cb84000000b005187a8b05d4mr20227293edt.16.1687784726892; Mon, 26 Jun 2023 06:05:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687784726; cv=pass; d=google.com; s=arc-20160816; b=BTKCsFCZQquC2cSNnpmMaBsaflo5B/QwO7IJnxFuf1+YFQBLloNOF1mmWMxuQRTdBQ LmTDogIFENXDeZke502N8C0Axs27kwS8hmfzUjrfJxGwM6KIRSfQ8AQfRyziv+7IJ5bg fFmj0orDpPi1CKoU9dRLrtOBndeLuM2SHFCQAwD5fMWt6itU9mEFfRjABXkTKBXs1fMf XU9dpVVIGFPDH4x1LuSnJPSEm91JKSUBQlXuFgLaziiZyw+otadkJPZMUyXEvgbgs4UC Txdgs9vRZJumR7nnPtQWuf49XVxazbG/JhsgaSpZCF5Se6ARFJGDrPBQ2YRAhkW34Nts m42A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ioGTAIn2Wd+JRgNa5Bg/SoYzMaYuYvU5PSPJ9jcgDrg=; fh=fuE7B8ip+UuRYp/yeCOPrX8hhnGv4MRUxcm2DDHYPRA=; b=DQeZV3CZzyfUtmcPso1oHsv18Tvt0NfWrD1MR/mTSTtvfdTS2UJksNJS89vFaRI8rq V7nQP+iG8Q+v7jjCu33wOU6Ew25UesKG9i0Et/oh13nfz3Te28bvu5fyQkG0CH+XBrfv QHeyRFlVIsyAsXwGgicnJtoJrvNBCPvFy1XP7ZBRRlDCovPQWljHeLjeI3W9S4BTbCVR oKQ2fvXFk4nfJPLxtnW2a8ui2aF1KwmWHPNpkFR+moRBtncs9gWCVjKrSJjoGJpBqs9C +tXsLPo7Tm3LnarnCu+HNLwJ2edn3RcGgAiHYFFaDzvZREHNPJoJSKcI/29mg7AVEZsa 6msg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QZNwaZcP; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a056402148800b0051d91e824c6si1797137edv.587.2023.06.26.06.05.01; Mon, 26 Jun 2023 06:05:26 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QZNwaZcP; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231372AbjFZMoa (ORCPT + 99 others); Mon, 26 Jun 2023 08:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231285AbjFZMoL (ORCPT ); Mon, 26 Jun 2023 08:44:11 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2098.outbound.protection.outlook.com [40.107.255.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43E5010D3; Mon, 26 Jun 2023 05:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l3e+1Ji9lFe/hfVzI/c4ixxWBPLuM6Khfk2ACnzQC7PPU5hR0GBy0whmHxZ4eXNgZAQCoiaSztG76YnvXVWxy34xBRNUoxgoocvryQ6MMYaOlielz+0D4IaDeq8EkmnpbzV9ujsee4eEjPhz3BlwawEX0gmLnsgX/GnlZmB2wlfFeIvRJuz3gdM7Kdfx+7zjDW4xAfKketyFTx/Tp7+gjBRht+vt4EdobtCqt+8nEJhm4AsYp0qEd61NOrW8R91L0uSlJcU+w0WBvKAMgASlUsCnWeO+IynhX5mLcrlMOGt091QGlpnjZtiOQIMAkHmg9L1iNhgOTj5Lj87F4yS0aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ioGTAIn2Wd+JRgNa5Bg/SoYzMaYuYvU5PSPJ9jcgDrg=; b=RaZCaq3/Sy0liMHCfzx6icwhNjyCNPxm6fn2BVqmbxaQpx/finPU/sdJoWlAalvJe0zf8a6OHuKwRlvC+VPl7l5bwAPj/RFRibNDNX3HVLPHBhBGQfLRY9kOr53Xlp08rYiAZnQQcXoSM3vpbGLRS6NOaT5X8wjvjas/QjS1iTU2OqXaBbXxm4GDsKGTr47TVvjZHP7yIJVuawGeq2P9U41yR8p5lYgz459A4SKNklZ7p7V0DKMxFEEo2SKsZBp0u/v7cPG/W9pNnNz7FtNQ47HCYSuM3RGh2HmpU/LJ7Snp02hwXS6zp3nyQ6Kr2hQ/gYIIG3IUN4apY4HGi4hd/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ioGTAIn2Wd+JRgNa5Bg/SoYzMaYuYvU5PSPJ9jcgDrg=; b=QZNwaZcP8uonWZXnlsGBfM+PGGK/8aUerVB2tFAN0iVa2XORsM89bOBh82Au1l0ESZSv7iswtBc/ktoNS4VXK0c540bGSw5Z49nKhhh4N3XnDoLmNfJ0ru3RBtqBh212DNXN7W24eHFgKZhCzcm/Y4mr5bd0UONIsQdZXxdWqGh6E+tb7L6A2OCOg+OrH21cgUNyQFDULveEIwBXyshP7sRfI4BI/NPm+0tXG6sIjfFmRLPtGyfrOmiJX+9GjrpS+kq3NXbMfqhs0wRcji4sSaDzVRstb+RIQMoqIisvHnO7Xr5/asTwezrUpx6rCvzbWudSUtPtAP3t/mj75IDRdg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5320.apcprd06.prod.outlook.com (2603:1096:101:7f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 12:44:03 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6521.023; Mon, 26 Jun 2023 12:44:03 +0000 From: Yangtao Li To: =?utf-8?q?Niklas_S=C3=B6derlund?= , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] thermal/drivers/rcar: Convert to devm_platform_ioremap_resource() Date: Mon, 26 Jun 2023 20:43:32 +0800 Message-Id: <20230626124334.15100-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230626124334.15100-1-frank.li@vivo.com> References: <20230626124334.15100-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5320:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e425134-940c-462c-ac3e-08db7643058c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qrTRQYIVOYZCXXqvaHFl86i88pEM6c6nJ4EKjOWgEM/rH6XoOfKn7VpgVoazKRWhR2zrZVylXyVDC5HaNfLOKefOh4mSiEYsNYnUkotX+BALByE7SwlTMn71jOLbLhN1UWS4CMABYbFn9sP9BEdqtTyZQK/32+u82erLl4ealRGbxEY84VNYkKUNvz8+fq9movwISslNd2pqc4n0T007s4OKV+6mpQRh2SH+SBWO4GwPYbqBHgQVDKwC9h2csr2nlYG8dvG8rdniNOx3+nR7ZuToTKi/oGCXy61gJx4xKicF65p9ersJ2YkhbexqfFwCOltDJKtEiiUxfc3YCuNYaFjzpTCHqfvoOlGi/VQ5gE3lKVoddCmm+aQ0gmI6UDc5uzwmQSFEBK5gTxCnNRxK59jmvpUe7uTce1rDTehw8sbHW8w05zS6ET5pzB1/I5sn2ZPMn5mni1I/gRpRT5niwQb+Q91g0qcU2HFGBTDx/P/gdB2WkDILtWTqQspVwhhNTeZKPV6TCzKQwM1pgP33czWNtss8IHQnIedaOKtc/gUPionHSOi7KQU8msmFNkHKKPjCbaTd98QQBn/qSruLNMyHcfM6toXkjW3CS0ZwXf5dnwTJpMVspjE/WaoVxcC2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199021)(2906002)(6486002)(52116002)(6666004)(38350700002)(38100700002)(83380400001)(2616005)(6512007)(26005)(186003)(41300700001)(110136005)(86362001)(478600001)(36756003)(66476007)(66556008)(4326008)(66946007)(316002)(6506007)(1076003)(5660300002)(8676002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VpC42RuVzVjJ5vgfnn2qRetO9rAwQq8GEVKNOSdf3lfQfpISKzZ9h+hN7RZOLbwGBsNg/lu9r+mjtHnbZvg5REh/NMke+yd0pHMCGah2uGUCgzYnT+sktDahnt10dsO3dtN+I4k+yvrLAc0FthwuS0XGrF8S22tyAL7IIQhScSN3GShyTRNRC0RJQm+L+EOH1t73c1tgjRQxcNe1xIaKVOck3iEGA/AZnNiLzN0+8TFoBNPbXolIpbf4RaxoXm0ugr8fmIo8tTIR11gYsy8Ld89T9mDlZF/MF7CdjIq0XnHxsSyC7h2ersCRbB7+NQnfL4jsNaPF0TkPRqjP2OoTxIElVEptS2aIQpAZ/AGRYSQICUsn5vmVVOuLcxWOlcJrhPraSRZdMNmPQKgCs7URkxjBl/VOFhuDDX487lIlBEWlmVMDyhqqhrwwdTfOChzK53iGFLKrPlu2O+N8/x2HdGZ1QgQwwPapskQ/H4FK3DH3hVUYznkvWoqazfvHSNDpi0JnROIOmcwDHICpK25ifjzACHvQo7ebUK4q/F31+eu+C94UBEHMtG4UIm5l3Dy1fqTIEGPbpXAt/BNmizeLkI++E0iK3Op0One28lcz6C7/GsTsJo5K9aoSw1wZ/tPMs98CBByTEcakzVNid6rbJEJMM6fvFcuOCw1NWjPEgxKXLbpnFHIopt7IuAPDWO+v9aE3tRLNPqFDAdsK+EMPvFV36tAYIuZrPTuAj+l5nfpcyfK4vs0om4bAdzp663ltMktTnOKtu33ViKDdO2xsfqh1c1W+ets0GJLsjgUkyMt74SMf69Dqx2mho+JYLHeGIqvP9rbYQkNUjcsFJOpYPG67fr3GhhBOoIZMw1laMo3ue/gfztEBN0jFFJenhrHARygRvVUyVC4TFdc15TTE9nAT9f3V7jur9m7VKrkgdCtJfXkwbCVKKZuGbxys5iL50pQxJq/g6wvbn1HKV9QxHZRv9rd2dI71hEoc/Xp0gr7mUoAiEq7sermDWzC2nKNIYZM8aqdBZkmECgCVJz5ga4TD/u5S0C/tXDXQcXDVNxZJpIe2W9NEnANg/C1MTWIfTQEKASxmSi9nCqHLLCgQRKTnEl9WzWJc8B7iVRra9DCE59vpTMKqxWhODXScM2D8CsiyWuNtY0a8kuC6HKWPotQBml1ONbA+omX70t3W4ob7GsxFDuxNWZ8Adkim1dv12YS4svzKGkZGUsD6bhmJ4D3wXgIvwIKbyOo5LXXL8+WwcOsl/pbCtP1Pq5YT231rg0kH9VgMLRERVGaQvT1JkD6vixtViwSo8EvO+ziDb55IT4IneGg/79Yu+vb9xC4A29yya2MCADNpMjkW2kzIES3gkv4Jy6YX9m3I09fRUbNZEAPmADgMvCEn+ebD2/vRfpIjc5hDAc3uoBr3922XLuMzd2MpFxkbLycRHKXQ59Dd+s8Qqz7EGeR2HOg6viL3ihnWGcfDKqJT7GO3APVb78HBneh0A83OM9t5/DWfKEgRwF0UTacg2verIEtJNBYRj9u4tTvVL8v4gTVLeMFiL6hgTQ5CoGgF1D+RHr6pVDbHEl+iRzwKZk0SJL3YMsVv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e425134-940c-462c-ac3e-08db7643058c X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 12:44:03.2966 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a8fCcJDYlmplDdheLD7wVTYPOm66Z1zK0dQxf6fq7DD51NDZeJSy3GKyqdwSavtYNkXrnTl3F0LJFxpWRsEjcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5320 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1769770557554737735?= X-GMAIL-MSGID: =?utf-8?q?1769770557554737735?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Nacked-by: Niklas Söderlund --- drivers/thermal/rcar_thermal.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index b8571f7090aa..04a52d82022c 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -397,7 +397,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) struct rcar_thermal_common *common; struct rcar_thermal_priv *priv; struct device *dev = &pdev->dev; - struct resource *res; const struct rcar_thermal_chip *chip = of_device_get_match_data(dev); int mres = 0; int i; @@ -435,9 +434,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) * Then, driver uses common registers * rcar_has_irq_support() will be enabled */ - res = platform_get_resource(pdev, IORESOURCE_MEM, - mres++); - common->base = devm_ioremap_resource(dev, res); + common->base = devm_platform_ioremap_resource(pdev, mres++); if (IS_ERR(common->base)) { ret = PTR_ERR(common->base); goto error_unregister; @@ -459,17 +456,13 @@ static int rcar_thermal_probe(struct platform_device *pdev) } for (i = 0;; i++) { - res = platform_get_resource(pdev, IORESOURCE_MEM, mres++); - if (!res) - break; - priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) { ret = -ENOMEM; goto error_unregister; } - priv->base = devm_ioremap_resource(dev, res); + priv->base = devm_platform_ioremap_resource(pdev, mres++); if (IS_ERR(priv->base)) { ret = PTR_ERR(priv->base); goto error_unregister; From patchwork Mon Jun 26 12:43:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 112936 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7465163vqr; Mon, 26 Jun 2023 06:03:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5VfCkFw0o5lKyDskX6IkTHFVx+YJ8nIfazsjUrEkrPppKRMmC85Nzeu7sAg2cj7AFPa71o X-Received: by 2002:a17:907:26c8:b0:94e:afa6:299f with SMTP id bp8-20020a17090726c800b0094eafa6299fmr26286155ejc.22.1687784598385; Mon, 26 Jun 2023 06:03:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687784598; cv=pass; d=google.com; s=arc-20160816; b=0jmLUB6vMsuycqZPkFWxQenGugVr/Ok5JUh6bOF9oMsPlKsJi7t3Hx8UkuOyNPmz/2 3L5cPpOYtZtPoaL9OqJiNHtCm2TNNXtp2mZq8uN/AHUiGK69D0ifQkYeFQa43cJ7wtpC BA5GfUKiRSrAf7X5cr/qMXS8BWtCGgoP9mpG/SklP3H7DLhMeD3VE7uf+ksJlxIRLYET nuEy+eppijFRjRgwJdBntIsp0Vu4lLcWBKV0Nhtd9r9R6zctbWaIX9L/SFCWxScMlhJD PlnXMKRz6IyBE1MnWpuMSld+dkwoPPGMN7YEC3kWh/MKCrRpt8v0i/xoOlXkWPeRRULQ NB1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QI00eUvuJ3p1dpdEmTbYMMg6JzFYG8FVxweSUEdPXms=; fh=PjgYv9tQxtBbA4/XbWa/L6wWLcPp/NDbdA68bEfSoNA=; b=nhkirkUJOVZh9tskDJaCjKoEY8PSDY1389QZnWkVZyY6/j95pYV0QoP2Pck/4YGTeO FyytTqak0k8MjGILh7Ow1wFj8z3ARgPvzjQipB4Nff/tvlkENwL2zfUs+hef9Ekg6Nio SLtn9xBmZ0I8lFcBdNKmrhatx+Chuw04VUoZNY4I3WCnX3tvZhFh/xIvZz5vIm7pmzMp hFaLbFLyVb541JH/JJpgXOSSe4zhvITFwl88pAXz0L6u4/9xESLq+qza6xdaIhrphoyW B13JJfg6S67mHxu2DUVYMtnC1kUcsBFctK4qxtE4mWe+v8a2WB3kRrtVv7344ooA8ohI jAeg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="R9My/m3L"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q27-20020a1709060e5b00b0098e4b5fa4f2si1427149eji.854.2023.06.26.06.02.16; Mon, 26 Jun 2023 06:03:18 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b="R9My/m3L"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbjFZMod (ORCPT + 99 others); Mon, 26 Jun 2023 08:44:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbjFZMoL (ORCPT ); Mon, 26 Jun 2023 08:44:11 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2133.outbound.protection.outlook.com [40.107.117.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 305A51AB; Mon, 26 Jun 2023 05:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mcVSkrTeoFGLfdhFmEF9DKV7ezdkGk6qxGYpBPFsa7LZ4h1EP+6GO7ltQErOyWKsuHM04EZE8VY5eDrCUEZePS/j9nsjKEamF0pXzFKH44Naibu6P2oMAb1W/se72fHzlGTadscenY22BrsO+jWzzZoOO0D7xWB6pALPzdL63x9dUhVXhu8IaWGJIzIards0QWUMXfKcJFsljLpbiZhEmBgekJwOJ1zhhxyF9QlKnlplv7AE+4rvh00qWptivO420WgC+vxkjVUxcO9YNQ+TWqUMelyHL2DcRt8XI2lfWVb7AjNZzkpbv3jPP/ibi+8gEjTojP3HbnS2aGRomJV1ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QI00eUvuJ3p1dpdEmTbYMMg6JzFYG8FVxweSUEdPXms=; b=CtkAxYDl2q+e7ZJwbl1Qdxid6RfjKE5mmU5hVL+ChPwNMxSvOzQtQ75Rty/meIs1aX/uIJWxgj58JqPrQc+nXroyDZyOiXrYtVOjsx2xeUilVA0xkN/65pfi3FQnEhvqcqYe3BRki/10juS+JV/B9jkoZqAFBBiq4UzpfrVWmfYRZtVz3tekBGOdNWiAlOG2XeZ0/rjR30s5D8yfUHo5t/plfpsHRhcFP828XYQPq8bmGsFfH7RDCRANbjjPxMZX7vUOoj4s3nR6pdAz3wZhc9lqtrUPbE1r4bs4KFYRtExtqNy9p3ImVgMRL1maslC/Sz2sXjU1a+slOSkfrf+jTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QI00eUvuJ3p1dpdEmTbYMMg6JzFYG8FVxweSUEdPXms=; b=R9My/m3LK9j9AfrEhFvIhc78ZvUC5Ds6ulPfAJ9cASCY2Fx+Vv+AIPyyY/U5zAwXqxSyJON4kBpQ5aJ0j2BAco0LAuaDAh/Ng/q2HyWhC2XkVrjDYAatktdHBlzJyQlbQgTeDNLklhwSZnb126XPlibyhsfxhSBm/LueX5wohIIErX30nQl/Wcz5pnkdyuZvqmt1VrM4ZbkSQlgBw/r4Zqd9AXaIqfM3j9DAb14/84rdxCJsfk1zt/Q2e4iNF6GVA3jhS1gd0TtfkywE6tVajIioSalpyTgFY7a8cp9NlxvmeRiuufJ+g4mGBeMy2XwuNX4dqPanPgD+hfFXtA6cpA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5320.apcprd06.prod.outlook.com (2603:1096:101:7f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 12:44:07 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6521.023; Mon, 26 Jun 2023 12:44:07 +0000 From: Yangtao Li To: Eduardo Valentin , Keerthy , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , linux-pm@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] drivers/thermal/ti-soc-thermal: Use devm_platform_get_and_ioremap_resource() Date: Mon, 26 Jun 2023 20:43:33 +0800 Message-Id: <20230626124334.15100-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230626124334.15100-1-frank.li@vivo.com> References: <20230626124334.15100-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5320:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cfa6f25-9ac1-4d58-0f00-08db764307f6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dZ6O/rVxIFaY41fZOmaXvKk2UHMFUSLdydSDJOa82cc/0yHm5d2t27QhtJWDHfdM5CxrXCp8AaPq8bYCUDHcE7622svmODnaT6fS9tX189u0O2YpQ/TzdspuwKvgVIjf97RJKyuYkA4Qf/lsAL+6Lx6WBSxVhycho0WZbpJ76BygHlBM0Mch+CcKdSXypBp/UgHrPYdbZI+qikkHrZMAlB02AE7lN9s73SwO8HiGNzjPZa1XGCJ8s8geRDww2r/t7J97bwbin3Qz/YGYLJnXicSH5V/poQDMk27B/rhj2JT2eOmgB0t054G40AEq9waOp8ErI2+4kxc/dBmoM8+gqw1TPS/O7RJvklvZC6m0fPOyaYvv/o4UNMfhBrtR7oUMXMOkoYSNj9VhSAkParHzdjjIfoQxXjkx4lvdl/7mjgriwMzoe+iZvMbQ2EnN76n3zO9nx8K2yhFqAx0bVzMX0i7LP+AKyHpILzy1Jux4oeWLJ2zJm3QpryywELcSgMT9cRkive+uGlYib8x5GqLtv8Dv3I1S0HcDx/s7RAapd2jgTbJRqKBPKG3pId3pFYXI76fYm9BSuVPzrMxsYFhPddLA2cMHMwWmaCDLOkUUfG3X9vGxXp3LT2Zz80T6TIF2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199021)(2906002)(4744005)(6486002)(52116002)(6666004)(38350700002)(38100700002)(83380400001)(2616005)(6512007)(26005)(186003)(41300700001)(110136005)(86362001)(478600001)(36756003)(66476007)(66556008)(4326008)(66946007)(316002)(6506007)(1076003)(5660300002)(8676002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kbCsAraBX2rsdlfCI1w9+746zrqaBfFwB9rwvnZqddVNAnSyYs+BFLgeENJ3DdJA60hj2nOXLyByeS8/4nzb30kHIgKrVky7oLpbV+HZrbyKQSvvzyj4RuN5Kq5MxmUntLbQhayPRMicKp6n8B1ypIgA3RuQPZG7CPDkNOxM6YH35SvuJIr+/HJ6QsHwGCSDZV2QpammqttmeqhLpYuJpWwbpCT8p5hkFoJh8hbd+qEBWzzYb0jepYdQWBOfrJsgvms7dYNcBGubE0RFWUhngMVv57QY3ecmwG6KmJX+0sg63xDJIAhfqjBVhRDsMRl5XfMJ7CUCwzVyI472v28tQFwQsWIoto4IaV56nOZ7rU+LAP7MahYvQUmTS3UPAxly+c4BVECXHnd0oTwp7c9B4qMS2NaXeikzBZ9NQFOYroN41gUr2Cs8e8qOeYuYzY6YVHT+h1fXPOI0HGEE3icywnr5MTmC1xl1l739P4m1yWWdyTTqoHzx9o1TTYwoXlJ220Q39IUVbNMd+w1F8ts3dX9jHtTKfV1Y1eR49JFHtkXas9+7x4Ktyo/eaMIOjEx+dwe+d58XHfS6pPBfqKxgwoQR0i2Dm5yH/yKm6x4da57n2+aY3ZojokYvtyh0XCkUx33mzRqEz0g1A292lcMjYM5MRWAnRASUBNxMrMQdTfTZgJmZ2IuoxzHzirPWmhOIftswk/HhmTjIwfwhHNr1WjHhWnymh6ia2YlZqudGxLpoOcyy57cOmrlVKp8UDm0zBjCHT+uscQWzDUnRoQ5L1+IoPv7YyQ7U5w23pZ2bz5M8TNYAGJeLLPOvWZZLpgXRe77o6GRvUouA64CBle8tC8v+bfeHexXCTK9/ueGIuFkdkOAGbwKgylw2Uz1P0ntJ/Cua9u8dR/2rmIHmOHbW0YWI9RQM5kii/Xja75w2FbiDJ4xzMRO0A6ca7oLMHvBS3kX7cAaxLqa6lLLjzuqIPJq80jQJWVkke64VwUi7Mq2ZbzLZyZaBVZ0rHqjiqoFWhwap1b0mSxsT7QjamHXcETgwYPZD7H3lfYPF/sE3Q9H29I0nnCiy7jZqKDInZH/4xEoElvn+kLXVXiJxGdInxNTbn3UAMcYt9kXT5CDCzYZ5t2yPL5itPeWa9DYcP+vtmOs26r+foQhySzTzkU9JFqVrM877U9wPsQoJyguBlkOR581gfwQFBXC9/UQVvoE0o2b26+DeBHTg3l0bmkVHrWLAlpGARCU9H26Je5tecJYUiB791TOSvytLUcwI17dnhDV+h+3U7rJ38rGrfcynGFxyoGKOPxGzEgPwuWUJwgzRwVDIxQNUqKKtUMk3KBReYMys89LbPDuWSDatrS/yaqHEgiQA7hF0T5B1tJdTPwLfVCWDS2RJNbVh3kzgUlTM+3T+TGK1d1CwDAqoDuS01fzqaODrRER2wAbR8WfGAuBFiQbnv2HGfKpl2DGa6X7orBdQXz9g+/6ImYNJpNkdd0kk3j6pD9OpplWfQrp4wibeAH/4NHXWEIui/urPHtaLYbjO03yaRRInJ1uSjro9sEFp1MSCFq/oFlRFtxn9eDLSXSbaP5OxHTeQJLtTBmAb X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cfa6f25-9ac1-4d58-0f00-08db764307f6 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 12:44:07.3677 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o7StTcf7TNJpn28jfsWCaUIFsXmKjo0+iCQ7FnVOK7wx38wtCHKhq4xFQvsEmb4HL/rbullCuq/TUIp47NDTLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5320 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1769770422881624984?= X-GMAIL-MSGID: =?utf-8?q?1769770422881624984?= 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: Yangtao Li --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index a1c9a1530183..0066b9150920 100644 --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -847,10 +847,9 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev) do { void __iomem *chunk; - res = platform_get_resource(pdev, IORESOURCE_MEM, i); + chunk = devm_platform_get_and_ioremap_resource(pdev, i, &res); if (!res) break; - chunk = devm_ioremap_resource(&pdev->dev, res); if (i == 0) bgp->base = chunk; if (IS_ERR(chunk))