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: 696781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE86BEB64DA for ; Mon, 26 Jun 2023 12:44:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbjFZMoN (ORCPT ); Mon, 26 Jun 2023 08:44:13 -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+iD6fhJOl2X5ItZKAInClJw8gAQNGGaMUV51I69QDcu4sSNn58N8R6FSMKgUrQzKuDhI1FrYnY4eTTd454lU53wyNN4OXpfGnBZWQijxTLh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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 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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:31 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: 696780 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D33C4C001B1 for ; Mon, 26 Jun 2023 12:44:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231268AbjFZMoP (ORCPT ); Mon, 26 Jun 2023 08:44:15 -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/cXvp84XhgnkPdS9UR7WFDsP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2XBiYzKA9ysfwpEkQSoMumj7ZOnUYUd+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 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- 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: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: 696779 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 357E3C001B1 for ; Mon, 26 Jun 2023 12:44:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231211AbjFZMob (ORCPT ); Mon, 26 Jun 2023 08:44:31 -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 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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))