[2/6] thermal/drivers/k3_j72xx_bandgap: Convert to devm_platform_ioremap_resource()
Message ID | 20230626124334.15100-2-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;filip.gregor98@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <frank.li@vivo.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com> Cc: Yangtao Li <frank.li@vivo.com>, 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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+EL4I4MDOoI9WXgK3gkNvuNTxLVdKRRcgq3LXGN2v0eNKCHRJ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tHrqIJhcfE1nl/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: <linux-kernel.vger.kernel.org> 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?= |
Series |
[1/6] drivers/thermal/k3: Convert to devm_platform_ioremap_resource()
|
|
Commit Message
李扬韬
June 26, 2023, 12:43 p.m. UTC
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
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);