From patchwork Mon Jul 10 06:33:40 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: 702087 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 11EF9EB64D9 for ; Mon, 10 Jul 2023 06:34:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231195AbjGJGeT (ORCPT ); Mon, 10 Jul 2023 02:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230392AbjGJGeM (ORCPT ); Mon, 10 Jul 2023 02:34:12 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CA38186; Sun, 9 Jul 2023 23:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XBwalNO8UEMWZRFsETEckb6WDxLzH1xJHHaP9JEW3txUtuVdyDOuLv29UBWCTZVD3bUndDN/2opKBxwRCWQYQ9o0nhKXXlUJI0pCCYez3gDVmLdH4mm8gLQ9uf/RgfiVBigxTTkVbxsAzBBQHHE4rk2ihRXjQGHU9e4tBFEHHcVQkKK+yY4UouxAwDChePZcngwKCkIDW4TGffvfuAvC9/tfCZmDzT2ll0x9JV6a1ChNvKAl4VQuXkFotoIFT/vCch3DuxcitdFCkjWkA4+HgrJrgPDLvLJmFjVxg0LCciZsUTLsDgBfCya0L6NW4YcXm9ryHD47pMCJLJWbCc0jHQ== 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=0JhT7tYU77z/kX/T4rfE0ji973y3A2PxXUt6jegiMds=; b=V/yIi4Cjz0NAESwdv1BvHT16wTn1mrGdZyG2Mmhbr6zOwe7l4alKc7WDwS4JKx7vfj8oGxaWxwTM70ENMI+n5tnlXluPLpfXPxhKkFhfOoMM82KOcTKQhU0HzWb3u3if0OLsj6i1LL2zTdfgP7CLKK9JnY+DGx5KmpvJJgImRo6Elf7uojgkzrtSXQMqMciAFvO6a+/JnxPKmZm6o+v9ZbtsgwgX7lilkTAafWh+Ryn8Oh1jTpj5rGuIYFmApjn3TSOiHbvQfl35noDtaqGa53mQ2tKPY4+50PlMZeS/SP/Ft/RfdMdQ/7xanhBDXz95lmUwbRTJTP0DeQDDZlGEMQ== 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=0JhT7tYU77z/kX/T4rfE0ji973y3A2PxXUt6jegiMds=; b=XOKEnIz0TMc8wgSA28QhG2qCIu4yIy/Detdm31ZLuXQZr5ZhbuOgdyxnNrMOgPfR89iu8nIbwcKPicu1+DIc9Ro/I19a8E7hJaEIjWMwx/EJH8s6r/ZgANukouKN/BdvNUILaiJsyKGAu3E1nayZMvvx6rIrRDjMdPOwZa1VuUExFmN3K2mvfkWb5DadxIdwx5zzwEEl2jlJ1mpZFqsBwNe/7l840Ki8u/vQYWXja6VI2syxN2J+6/Oj8nAPnjdaYy/dfJiYyEQhCH4G0ClDyGDId7FrwVyErXVRfcLnh3Qi4apQrkLCgGNxKMBwSFatcbjeHUkQ6dfisYcR/Cgihw== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:02 +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.6565.028; Mon, 10 Jul 2023 06:34:01 +0000 From: Yangtao Li To: Codrin Ciubotariu , Andi Shyti , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 01/11] i2c: at91: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:40 +0800 Message-Id: <20230710063351.17490-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d686045-ab26-46e6-4bb9-08db810fa61b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k3+MPNp9eSdvVWwno9NN5vLGLWTAlVlMBB2Pr3DRDWOeazPO32nu444Em3EqGa5q3XwqqT/lHGT0vkcPU/xXrPVgNDjqLhaq8tYENvnx+2R1QrAMDki/sStmOMpDV6qmdvmyA1y+/Jl56tJV80KYhdFITQKjRJI23j2Xg7g7BipLC3pjq3uy7Pgfe0KnM4LqXPc8+kdrISc0Urm8EnjtKEI2E+dCZXADrUtkOsuEiO9D2A/cYlvtXt9VrNdvw7aQDFhYGhfbi1rVwL+hRReHy4ApdKJGY2xMQbs/IOBkhpCO4cOGfPDRBqNrNiOPvjFVMS8PK4zBeG/IKVcSnre/3Gw3+3lFxgNSV1VWVO5kwixh8MZrAiVrlTITeOhPLhRGt7eaABu03UQ+rInRxQLCQHjTWKmcbT6u50S4kiHLu5AnhGSnC90TxsluxfyU+nIluH90Qv+B9D2vWABw6jA21cdr/nHoYVmqoqRRwAcyOPe4EScCKjCLj04Fd5KEYH1gk1vz5bNjZEx8xrv1H4ysaw9/oVOpltJ2lJqsy0G7fsB4Kjwi+cezpVZMCRvjs+lMxUTqwusvlr/4GrezBasGC+DckA4onSrqIv8N0vkV8jUo/j8A+aXKbpL0kmCC9GJc+DMIe0cc2AE9ax9SjeC+LGgJhgxp0Zc0fqe/eDEOZnc= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HbrzDYhMfQA8X60ojhuaCFe7d8QnwPq+RJ4UQL94z77GL244bdQF0W/b5f8Jpo09f76ZWLLPpxOdSzYcWN75u5J3FgCJK78AO+dMpM+gXJNqGuWKWh8NDqJrck+AtMIGCpq+fLYZs0ypz1lQeF6inJjKcr+HvVCLtv/lOmnKzmIgFupDKIJHzzaZKz7ZDgGw4F0uZpHPWGQSlwojZR/FNFXo+x7HYcBRcSIDZFyJ2rHrGKruMnliakSY4tSjlrk5b6AJhCyXCdQQRsB9TfQuFR/y0+i1XDfs/fvp4kQsU6JJIIqUuP99s/RBW5QK7Vr0inRU8hphNiZ9biWOOxkOZK/V2kFOq8YVZ1p1ewwG9ii8vsi++EJcskRpUo55i9JCIfuFZMd79VQfnG9UoUHuerqDGdEuLmwQP77reU2DAQuiLuUobrl5b7+R63jDw/oL6X1LKcrvyaCksYYflGE4vb6P/e7DWlZ7MBMMSELU4y/hKzhPOK/wvsbV6zMhbfWJEW8pEaMZjG0KcYRJoX1NxL2m16dRrhX7gke2UbO+oPdMzy9sDJq9T3fXV7XxA/gY1R3DCtC9gjpOV0NEQszNZ1assWMukQRghe+Jp6cwwcn84bLKaGoPYObM0po9sMbMXFNsP7xCZXh948NEUAi9dlqwKpcLSKKGEOdU5VoCb6xkp0AoGiWuAlKyARfnqrDLk8/1q+fnPNkZkvZnh0fT8GFHUuTNODd+0JFTVlRQaYz90R8wx62d1LOEORnoM6EzpI/dJLXj1XtW57F48kaXwRO4Ou0qq/Tw+Fuul5k1o/uShE1wJAdehqeYMYB0B3FXVS/q8BaswbzMNOPIZmNyELYbKVlh11ueTyXtDtfIx+eDQYIpK2aKOpRLZnQQ8eJqlcEvtGj0SZkDri5encrUs/za2471NT7EbhXPnJnSJfrqgzzCrPdA6wD6iPaqSwgXFX094HfFcLmh9JTUMq6pP7V/gHfOz9JrsW+r3oxxt88ckz4QV5wIIpl8x6OWAYUasIqRGiQQjx4ANs+1UvQSXIT5QCpRLBVlQN6q5w3OaUU18HHDB5aOKFCcE4x9ugVc7wkPe0b2OlfTqySpM6YvbZYmZAhDkrEFS4e/QpIJImVZABsnDgxaNCmN3WD1PAMTHjOaKGlQqwvkfyR38TpcmljgKM35Vcpxvz0cggZCOycPuI/lQemjB7c1NRe9GQJdJGINKT6HO3Oco1HXzPBojp6UwSJXfVBsldiRKNtcmiq4V5lSf4VYNG+z3dLFpc8uat+Wgmt+96BaGFYDrm68ngHpE2jo0BLg/ZAwSnj/UGZL44LiMDT25q3tucLjVHBCtWOQW4ij81j1uCIyPi+egUtSfdGubFV7mbT+xla3rCQ1XpzGI9yLU8B6k7KUFqJ2IH1vvIV/A62gVtV3jr4gW2RYJJVaQ/GD4yTCJi4FWSBHlBttjYf0tfDNUyB0PgkKik+Z2g5Di01qJ9Cv0T8+ee74G50O3Asmeo3wGiIPNG/8ZK+2YY5+8LSO8tYe93b5CQtN1ukJLWMNqI3ZeyWgHfhc3frssm1OQMmkORyEZRI36fGuXFKlgq6jkKj57GUi X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d686045-ab26-46e6-4bb9-08db810fa61b X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:01.6875 (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: gnsB5Y3IdgUWq6/4zvsumvNOmfXslMMBNkf0kInwUdhCeHTx/edM086UOvbG6NWsS46vtaQYYy0hu9i7FDAzlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-at91-core.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c index 05ad3bc3578a..de3b8f1053e7 100644 --- a/drivers/i2c/busses/i2c-at91-core.c +++ b/drivers/i2c/busses/i2c-at91-core.c @@ -207,19 +207,15 @@ static int at91_twi_probe(struct platform_device *pdev) dev->dev = &pdev->dev; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!mem) - return -ENODEV; + dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); + if (IS_ERR(dev->base)) + return PTR_ERR(dev->base); phy_addr = mem->start; dev->pdata = at91_twi_get_driver_data(pdev); if (!dev->pdata) return -ENODEV; - dev->base = devm_ioremap_resource(&pdev->dev, mem); - if (IS_ERR(dev->base)) - return PTR_ERR(dev->base); - dev->irq = platform_get_irq(pdev, 0); if (dev->irq < 0) return dev->irq; From patchwork Mon Jul 10 06:33:41 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: 701363 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 B5A35EB64DA for ; Mon, 10 Jul 2023 06:34:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbjGJGeW (ORCPT ); Mon, 10 Jul 2023 02:34:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231207AbjGJGeR (ORCPT ); Mon, 10 Jul 2023 02:34:17 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DC5F19A; Sun, 9 Jul 2023 23:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k3dTnPMLtHSqghhbiKGe0IzPQL0nZSfrzbLLjZ2rCUxAF+iZ5xIvi6rDt4HnTmPPYu/9TKy0k+laBuWuS/s2+54ehHUEQWzmETcqpCyT1/FOMqoEyhWEy4G5xHO9BamKwwqigCI3GZXBU8GTviZvOHB77ZSq+EigNGX9vlK25KLx8v0zm4csP9rq/NmfL6PneU/EwGBKTzEKSd/KralJwsjjTfjegL4JWMWTwgmBv95nKl7oy/PCRlXVxPg0mvn9DdwFdzbsMoNf9wHkxbYSCXDBn3E7GIHZy68HJLUPj8BcNF8BZ1QobBFI3k/9vDyeEoaGyNmtS94JOE3WCqCHeg== 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=hN73gP+t6EMRGrVL35P8x/pQjqmbtVPaQJg1ASEgUUU=; b=M0vMhPxYRusrOEv2vy6WnabbRYGul7m7QRbEmYek7jxWLVt8hd/zJHqoiO4Q6JYPUFMafVtI01zPaDdm6QLE85FtYZwpTDHtsUhuklLBOqbf9hifxQkH+h5TnMcIoTXYZ3P8FwADU4O8DQ8739MoWeTLhaNSGn2X5ug/gOKde14J2KvJrKJy/BrutU07N3L/VhfSmyoR+vinl7A6G3GDDKZSC1bxKTbPrVZO/YFXsQrbnfW0ESPuDe47xmI/+FszJCl0uBViLtQ4XG67pOVUXREjKpJe9rnek7WCIrBU47UmRPBmKjfCXSNb2l+Z7q7v6GUcPGvyDcuzGM8uJ/cqcQ== 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=hN73gP+t6EMRGrVL35P8x/pQjqmbtVPaQJg1ASEgUUU=; b=fCqjq38Yx3arq5dmPnkiBQOaCWjXm3kDnQoegW5n92UtmVWrxM+0AOnrv3eTxGsfhH7mTgbYCSV6fkqYmlgASgTj7YXZGsPcoQjTSl9AHg83eb7iFIw5EVCOqmhl+xCLsUkpGc2qycy9k3/RkWbAdWlw1mSg3UTA4R9J7za2xM13ZwvRL38AtMskpcAI5jg60kIlXMRSq6jFfePRaHQ3UE1kYzdqbuSvvADjBIuxtDYwam/lPxr7Wtmh5ITDWfpJcnxJYmx6w+25SMlYANfo6WDW9YD8xNv2b3+qXlvyUt66z0QWHHq+nTiRBAOwi8qrNvKwOqCawB3yhN4Qx5EnWg== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:04 +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.6565.028; Mon, 10 Jul 2023 06:34:04 +0000 From: Yangtao Li To: Andi Shyti , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: Yangtao Li , Ray Jui , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/11] i2c: iproc: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:41 +0800 Message-Id: <20230710063351.17490-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: c41690a8-400f-4ca3-fc14-08db810fa7c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XdiKIrX1hL5BpJZOdobWVdGiLqqVo5D/2ZIYRvzaPTCS3eWwBW3gIRzGf7ynyofFIEflVoPuNyThKwsienva6Rtgh3D9xUFikocML+z7ilIq1Y4KbrGPwlyf+1s+ZazmZyZipPO/xUmiefeI/0sotQhZ/XosDc2QU9PwJ/psmIdPRe/QEkpWSjhBjQ0OW+PiExcwUmrrNF5J3t6/zduU01z0I0l+UR87dur0625dfCyxgKrLhZU0vKQdlJnm9OyAkF269VzajKKsjrQxLVr0ZfKC1IwpN/djyQJDAXGrmjiObghvR8fpcquY88Kednpn3l8E10D1vrTkEcyYiyHb8sky/RL1CQd638nI7bKxyAloO0/8kg0aC6ivq30d291H9JFCp5xO4Q+eFjxqVkmCrSpTRjY1FQAQmsfv7/xWNc4gia8lD6OgmiR66UPOBT6okf6tfsfyzJ533eXqq+nyf21RhSApBW9FbKdM29sp7NoZf+BuRZ6GrXnVwKPQJ4S+6G4ZtbsuhhvZx5lFmevihAalFDwGDxjQxqZNFx+RbV6EGkPsylKS79KOcCQgQG3MHBsplSkx5B/1ggVRwdCF8bk/lw8F1OyFD/2hLET6Y0/UsMdWcRezx8NJhdpHj6bC+JJ/b+Mu3XHN+uKPPhxSegv4itP2Xk9dYXZR8FCpY6E= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(54906003)(83380400001)(36756003)(86362001)(2616005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jzNz9PBWuiMiWznAWeXQV82fr/weF1T9oINowbiAZ0nE1TbHLwU9Ap8ihWfyJ08+wxz2R8Y3l4f6AUunNOE5D6VHbZcLeXJ5rBTZ1fWs8y2k1r79+5/G1xaUtnIi9s/WrvBKkLgKLS6sR6EQIoiA0vkzJO4xsBgix+YaO/E9KME3s5H602AYbBreA37KYH4daxEOdXxZ6HOI+jMvbI5Vt52sJPSsRv4dWHAaGYi2VYCvMI+g7MBx7YjgqsoJtHaPCq3Oz0JRhDTxuVYWC1Jy09yMD8XVN+j0hxo3q61IGcidlP8d4mrxW0IfWio3mORjbMIp52cMtT2mDGjzlkYZg2/BKICwBfWnfmFBTXyQpZf/5uLPd6NAalWHBSTYn+Osj5oCmZvCb06yEAadg4L5+r0zxNXJiq1/jYHZqKxOR/GCptET4D3shyKBdnOJLo2hH38u0DJ08ycnTNUT1ywtMe8vL3x2I2bZesTxT28Fq+HaXlIoHRI4xVlpDccKFzUHUFyJNln0HHhveeAdRfAcma0ZY30wsidx21IHJVY601yKrLcxZTjc1buZmVBKJGjEEtGyCjUfVi1Z/yIz8gagLCy7wglfo9ZgPtK1zTdALs8zPeXo5/pkJ5ydwn7nYpxjmPyEW7VI7iaMcIGmjiQruJjjtNaRh1u+1cZzCzgE5trVtBQJNIj2Nc/PZ20jJioKz5fyadkvbWcpkOA9YNMEes03wUANX5U9+BW5sudetgOBmNiDd7PJZ+ZtXbNonHYTkPJ9Ew+XK2Qmr7Ha+Rin9kb7jc15mgmRv/LXEqLENUkK8Vs2IhY6Pau7dTttxcizwvQvJ9chSHN8KMUf3EuRgaRNuTtC1sehLIW3vrWl5FomcOe/fHeGIeQ4Rn/XxXy4lsDv0VrNeZiQ4tOj+sYrTXUq1cHRMb6uGqDvIuhH5QXbxf0bHlZZPaTCxzL1v0vAF74CqZmj6NFJE1XXah1/UrqRigMSaKEGVK1Ocke2HnVJITiSpMMVQYInyE4SbjP18vNIw62+zEN9wa9JUF7ER15eZW8ne/tuj5x5Z0trY27cqEznPd/3iHu54BBlDN93zF9wHRFNjjklx23mWYxggR0kfQRKVuMp+dYZD768Svr0zYFl5C7efgPkO8oEdCEJq2XZrlBPhJXeIA7KLujvf5zCj+w3pPUVlDCM3BupTBLCnrXj+YkZvE5JLxIkNZg0VrobSxcTTtXvjE0yFuQlZKfjuzIOX5Rn/j6vqcvlmQnTJUdqUgC5XfbwC5GdSH4Jaxt7XuCydr2UJUKeyfA7YhM6gesbZNV4gUlQTf6XJ1+k8BlyZjRxfPx8GRtI1ZoQP04wvb8Qurpah3AOdrg6ka3aWbJd83dI0aVuWA+/1ig1nLE2fr1Y2vjfm53tJYuSLP/0l89AJAwuH+C0+3wLn9x4BrUwjqYUF+hMDIRHcuNKvuwlwHArH1ziHkvsIXvX9B1KEXE65PcPs7JtF8VMyI+QAv2V9jphVMobYzWfGoSBBIC74TXfgpPl2g6MZtKSDqfPv2MwUPdjTXm3q8si3s+FC0hl+sEhZ7Au2mkFSnYjdgstp0IdNt0R4dOXyyLp X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c41690a8-400f-4ca3-fc14-08db810fa7c5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:04.3849 (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: hEhuyslz8pindEG8HfdRwdanNCPxWjbwyvW8tkS9CJde1m/CdoZbLW9kMUzbI6NGX/aQz6Lb/cobUM0yHNV+zA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Ray Jui Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-bcm-iproc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 2d8342fdc25d..3fac85be543a 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -1026,7 +1026,6 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev) int irq, ret = 0; struct bcm_iproc_i2c_dev *iproc_i2c; struct i2c_adapter *adap; - struct resource *res; iproc_i2c = devm_kzalloc(&pdev->dev, sizeof(*iproc_i2c), GFP_KERNEL); @@ -1039,15 +1038,12 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev) (enum bcm_iproc_i2c_type)of_device_get_match_data(&pdev->dev); init_completion(&iproc_i2c->done); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - iproc_i2c->base = devm_ioremap_resource(iproc_i2c->device, res); + iproc_i2c->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(iproc_i2c->base)) return PTR_ERR(iproc_i2c->base); if (iproc_i2c->type == IPROC_I2C_NIC) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - iproc_i2c->idm_base = devm_ioremap_resource(iproc_i2c->device, - res); + iproc_i2c->idm_base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(iproc_i2c->idm_base)) return PTR_ERR(iproc_i2c->idm_base); From patchwork Mon Jul 10 06:33:42 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: 702086 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 EC520EB64D9 for ; Mon, 10 Jul 2023 06:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230120AbjGJGeg (ORCPT ); Mon, 10 Jul 2023 02:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231292AbjGJGeT (ORCPT ); Mon, 10 Jul 2023 02:34:19 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2112.outbound.protection.outlook.com [40.107.215.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D01231AB; Sun, 9 Jul 2023 23:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YVCwCDLFbYy/UnHtcFFkp8Rj7Fo02/YrV3b0dYzXPFWG7whq+XC4/D9OOA1///ehpYNq0E9URwYiiiXjKBv21uVBIV2PUqtWPzlO3ROvFBU/0f6/fJJ4Nrg+pLYHQVFaF3ATrmBbtAwwYDHVucIrsvUmLvhl7q62s9eELcDySzTL/j6Suu7tcWOAAf9ihtvpUx4HyE09HMnn3lgakxYuw8flzfieXKnclq6iezKJXVsioTor73+PKFmWg8sm0uNarT4WGGMRCqEaemDBPPAjvQeoHItn0KJbD/B/WWAikP1eiDiaoZdOctQhnsaeQif4DRO2f39UCRk7Jmx/5IcZ7A== 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=o+wD2OlQ9bWbKD7HJUG1jwJAxm3onlW79BpaaRcJxpY=; b=AczP2kkzwGpMoelA6CayRZDGkD1SleecE7aaJnhDmcBidtCq/GJsVR2XOUV5u+Ewwwp1AOmpSNtQwC33PTG0CFeLuVjSH6IYLj4ZG7rOsJ81Hg5VAfnWOZkRp37MCfxajOYhdjiXNG1BtPZaI88U8/1ff9S8l9Htt8+QYSMtYziFEjW+UgKEybryv+6nNpwkg5+q0nW8snPSRTO7mesW/vbomPFp/Pmm/q6W281NPL24IrqHpJcbewv5PwZdCd09uISHefEjjCXadjULQXm438V0PEMT/P8Ghp8dxx8zoJHqRyDt86sl92vN/jduUg87rw5OzieY6UT70vRwFaPvnA== 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=o+wD2OlQ9bWbKD7HJUG1jwJAxm3onlW79BpaaRcJxpY=; b=Vx2DBHst3y7dGyMTThX1WfLQABxQwVeMCZptj/xjOBitLVKZJ6AFVtysruewKeNyHsd+ILmkoPSSVt0jpKWiK9MNh81n14Jqi7CE5opguOcJTLnpSPIq93eKsRSBel43GDf8hjX7w6FUotE1J2BU2a8W5R5DgcWSBJR7rzUFYHgFS0jEPS7yPgC3E7D9uxbwsn8hQDs3XNHvZ3E1QZcaWf/1D8Z7Gj4mVizp0wnJC/+mNOaFbn3OiN6I3EAtIE1XVjAJZ4nBdvdfV6M28O5cDfkH1JCyefY+8vL+fAQgVTWfp3K7RYy1zgw46wL/6oM4CEQcghuiGhpLYU3mh5764Q== 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 KL1PR0601MB5631.apcprd06.prod.outlook.com (2603:1096:820:c3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:08 +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.6565.028; Mon, 10 Jul 2023 06:34:08 +0000 From: Yangtao Li To: Kamal Dasu , Broadcom internal kernel review list , Andi Shyti , Florian Fainelli Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/11] i2c: brcmstb: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:42 +0800 Message-Id: <20230710063351.17490-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB5631:EE_ X-MS-Office365-Filtering-Correlation-Id: cb8ae2c8-c0b0-4cf8-d952-08db810faa06 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kmjjjf+gWpwssElq8O2LvZ3ZBLwhKZsXyQtDhobsBmpT+0/Dnq1GZvbjZQa/4j1jylYyfWEfezK3L+N+67LGOx6v98o/6bdRGI262QIxYQ81mv5WgUsuisYXjK5GLu6KbH+7/lFUsyLO+jSfkmr+colcZAUx/DdtmHYnS3aBRWlgA5dyZYKae4KqGQdtxq1xf8zP94BXgyOjpFIMFIgFV3BQYx4ELwjlhoECFUERE6sS62266DlN60ddYmQ/zaYCQc5VG/ZEn3/bqg3qrBDnZPXsHXGnRLGwHYhJKV0Wtox0gHYD1B8z5NyAH7cwl4D3kQu1o3v92C9BbmL+NUvP1QTjnXx3PbJl/EmkOmu3pfHAzIA7t3xpNKiUgW7iPbyv7we0FHBoWlpuaTui665cMmWfjwp4/+OJzJatH2++TYMzdcKJxiL/WGlpChk/EeXqYiROvpjTVIxQsLBviP2conOvtOVwNKrhmnc1MhSD2AWf1BL5wfBnRuLjqq7zILCCyBg+2uoyJUXD2f5bSMeXQ2shynFpu+MlweVn2z4KT3yMcq3BPjzfQKmuIQvZ4v1ka7wuwpwreoGU1mjgljlQBChKdjK8/Ht8YksTanCqDq2d740gZfQOWfCU7fStgB5I8AgOa1CGNJ5te9AjvDW2oA== 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)(376002)(39860400002)(346002)(136003)(396003)(366004)(451199021)(186003)(6506007)(26005)(1076003)(2616005)(6512007)(83380400001)(41300700001)(4326008)(66476007)(2906002)(66556008)(316002)(5660300002)(8676002)(8936002)(478600001)(66946007)(6486002)(52116002)(6666004)(110136005)(36756003)(86362001)(38350700002)(38100700002)(133343001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GGA00dV2vQxbnD5byvtFMw7nxmICjKvNSV74NLc/Ieg5rsEE7obUNSwegBtZD97CG2ymSVBfKN964DvFhjfUHfcBh6Uuu6lRXol8i6rsCqobqILNb/FjLYT6u2c6MzKjiTkYgSteIQEcWpKygOEgW/bMoM8V/+x1cFc3CRA2KMrqT5OxSNC1L+bsbki7EDVkViqpSS0IWzW4Qj2YGAtHcCOzAVN66jflGRFnHfBfvOgDNxAa+MZRx7SzyRiGX9bdzJEoV3dDEQau+e/eIm9UoUSwQtDrSwngme7Njb7fpj8jRWsC6SSrCganSXkturAaddro3VlDMB47m/ZyneiO7b7oNbC0a30jMBbLAc/QwZj3Tr4P2p3SeJg02x//XMgowCsAQBtxrH/rRK1r61kKF4/0j+WqJqpp0cz/vSICmzTiy+zZTyjN3aFFsZ5lhJgN6UYm0HR2goGaoh6IZvazGF9/nE1zjVzQyuS4G1tP5Elohj95XQUQ1rvMrukvUNagJf05OboFpO9mRUEy8AM8MfLY6Q32uwC096jytHAtbgcELiPmWeSONESP48PE+z1SbXCG00a3ZIpNon6xpKTjcKKn17Kh5uhghrQVfeZtTQm/SL4hvA3z0kok2VlAkIeeOV4DOVYVIXF85/ZatFLtO26WegoWnwKpJqnMmeatQvJ39awx6Siqu8NaoE+CAL0hZ6pOTrQaodpZmYtl7q86lMHcrLOicgdV2dsTsaSgVG9znMSfjJ6akgbbHbJUaJtVLSKKZSGLiAZo8dpIVLCkrIP/mGzVrNVrqUQL6UuPnOY9iBKREX4polAJWRB+HYusDUbXQ74/gt12x+tDy5XNT99EGb/wSupXauUny7mvv+TFEw4nDhiBDDqkzM/odxTbHm3zODMLAuYDOpuE/miVq5/k5zwlcKRDzFSXGH0VK45nFAzne5QIy2GfiRylIN9oPe39xrA1DD8G89b0q3eXrBmkd/SsODYJ+NFNk99Q3RLl+psFMbzFhpgWgmkYA5RjuFJpxYEzzy8JG/llIj6EM9SsOSRiox5ZF5cE0Xrdl5gov6vO7nVTS/gVaQGal6YrjsZJj3etdSAf599dbRRk3TDTEjE7jsZWXRt1NS46wpTT8LOt0thGiWc9IzOD0o2S0s5Q38IbW235Cdf6kahz1qrEHC4tRySPItXCVCJgBdXBStLNt7g2hMQIZ0jFk+7qNRoqVpxYSVTYPoC153oEx3gR+FPZwQQbniGw3APwnNyi4Vt8DF+APiuXiX/kCvKfCeJzc4K78sZYkYYrQ2aOvoAzzaf5NusSo+ECRxl/7Ay73yc3qD8n2jmWZJ2hBpS22KUdzwx2jNzi6j68rE4ZZO9yl+soykDEUQ1we6ZG1XAFBz6IYvfRAL2OYmiGLuD9bOtZV3WNUsFgKinn0Ws1GFwb7EicCinagbDyYU8UgSN95AF1i3nIAdxaIyFNirqQEn/iW1eVqQVnbxFGjMS0Hv23k+cpnVG/Q+tIGSos30JhBnkQj0WlDLXOv8vwl8p16QlePeKd8wYYMwP4hDwQ0VI+qY2sQUe2UlzgJ3CXpy87WQgDhYVLBbfUtvJNZYmY X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb8ae2c8-c0b0-4cf8-d952-08db810faa06 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:08.2731 (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: mTopqEJugnMaeQFNLrREGTERWrPjFhCJHoyPyqYfQFQHR+sZ56Q6oW97cwUpZMeJw45xDPOoUMouo2TZOlYBkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5631 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Florian Fainelli Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-brcmstb.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c index cf92cbcb8c86..0d422487161a 100644 --- a/drivers/i2c/busses/i2c-brcmstb.c +++ b/drivers/i2c/busses/i2c-brcmstb.c @@ -594,11 +594,10 @@ static int bcm2711_release_bsc(struct brcmstb_i2c_dev *dev) static int brcmstb_i2c_probe(struct platform_device *pdev) { - int rc = 0; struct brcmstb_i2c_dev *dev; struct i2c_adapter *adap; - struct resource *iomem; const char *int_name; + int rc; /* Allocate memory for private data structure */ dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); @@ -614,18 +613,15 @@ static int brcmstb_i2c_probe(struct platform_device *pdev) init_completion(&dev->done); /* Map hardware registers */ - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dev->base = devm_ioremap_resource(dev->device, iomem); - if (IS_ERR(dev->base)) { - rc = -ENOMEM; - goto probe_errorout; - } + dev->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(dev->base)) + return PTR_ERR(dev->base); if (of_device_is_compatible(dev->device->of_node, "brcm,bcm2711-hdmi-i2c")) { rc = bcm2711_release_bsc(dev); if (rc) - goto probe_errorout; + return rc; } rc = of_property_read_string(dev->device->of_node, "interrupt-names", @@ -678,16 +674,13 @@ static int brcmstb_i2c_probe(struct platform_device *pdev) adap->dev.of_node = pdev->dev.of_node; rc = i2c_add_adapter(adap); if (rc) - goto probe_errorout; + return rc; dev_info(dev->device, "%s@%dhz registered in %s mode\n", int_name ? int_name : " ", dev->clk_freq_hz, (dev->irq >= 0) ? "interrupt" : "polling"); return 0; - -probe_errorout: - return rc; } static void brcmstb_i2c_remove(struct platform_device *pdev) From patchwork Mon Jul 10 06:33:43 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: 701362 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 68FB9EB64DA for ; Mon, 10 Jul 2023 06:34:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbjGJGek (ORCPT ); Mon, 10 Jul 2023 02:34:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjGJGeY (ORCPT ); Mon, 10 Jul 2023 02:34:24 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE43E40; Sun, 9 Jul 2023 23:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KcTc5mcQaoeayibBCM3xB/GdhmHeqaMzrmR5tl0L2U6+DqXgHzJkoKPqvPnRQx7wk6WNvxzuuulXkejeu60m3qmFW6GofWnDFs0tETrfZsp+zZf6ndi+xVtjL2tUudYDRNrobpHkVHSYfwH8hfstMf5u/WaNnoEAz4sNBY6qLdQk3YhoyzKu3nR+nak+i8B4CJlCdO2hNTe31e9xL7B+9Kd01SIGyAdj9gsa28LAlYAYAZOvU4FJGW7u0jNtFqBHC4+fO+vb4ALeJhjJnCt27OtSRQrfNrADDO/jHB2sl29XNsKzvYu1F5vY5ezcL4iBFkjaNkZ9AQIQitTx7XGdCQ== 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=EtGdsGjKwrkleQHLRTgg+RRLnMhaS9ZoWfQWbgk0L7c=; b=Ey++zx13NwvU4pmEQgpi6o5f7LuZWBK7uBsBDGgPlhiiSyiHA4C3YdX6EoMVGvi3rQn1qNE6lFReQ1+3gfZljpYY6GJDu9VNJMwej8mH5aJV5V8L+ZjG0fCNnhzEqm55emf9RQXcL/NYn6rN6ku029/Gst9jxabb4RDYZDzs6izg+wKv95qx5VKwI+v3PceEfNZGA7YZ5NZTrAJ4tU9wXcycHjK4/5Nq0edxQoPo9oUJRO4Cika3rwWnKxn7e94qCkytPxUtAaXBLsIyF2RUz9qsdgX+7gixaEslNfrQA4OkjfWHXGW0pM8JMqqe1T/I+UJeVHDr166uxHTnNCY6ag== 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=EtGdsGjKwrkleQHLRTgg+RRLnMhaS9ZoWfQWbgk0L7c=; b=OPABu2nVgLBgNoKH+OtvfwYuHdzPRJol9aRf8F7Gd7lGCLzpuKZgIOBuozAsAmkHHhO0VGp9+56aek6HrATt8N7g4hjmRInepTVspBx1R3f2ZXW+AFOAVV7tfakS1G8zCRv2/UvR+wOQa4KZY0wyseLVzqTIz76P3lsmlfiSjeoKSEeAvuz/myDzsJgY1QUPAXmLXJTuwEBuZGlmXb8alaxA7gqAanQHzOSQj+TlGiuX1SceaCHLQc+dHPn+o73xSscukD7snqiZGkFZYJV3ASuofm78KYWbNvW0hqVy1F55bJJEY90UijqlCFWk0daCzaBJusQn4eAZKVRP2VjQew== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:10 +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.6565.028; Mon, 10 Jul 2023 06:34:10 +0000 From: Yangtao Li To: Khalil Blaiech , Asmaa Mnebhi , Andi Shyti Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/11] i2c: mlxbf: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:43 +0800 Message-Id: <20230710063351.17490-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: 58163408-2c4f-4170-9264-08db810fab54 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iX4ucmjDitEvrcMdJ2DnM/zVkgjV2cq1D4CKrpC1os4ERAF0kGacKocr65xZ/wgi5cyDpiaNi7msH3CX/JVFCPOhKF83o8BCUMc+F9jhbo9PJBrrWEX5goeUQ0fCYaIRTjdjDWoqBc2dy+q1jHLQCZpKVZL+Uha3Si/e46TkC3bU0iNOhdCbBEG5RGR3TSIpYognShK9lYbFJKtGik/YacmJtQUggUlqk2WTRLTEpFGflYuvDk1QO5N9V7yd9zboSyOi9xNbHg5irlgbnKFLN+t83TjLuUArw8t29AAm3yekZtauBsv23DOEhaHU54m5Sxu3OTLYIvR3mKer29go9+KoQe8zhWwANqSdBNa23JZM3ekQRIbQpH7qSIfghqaveSXjieyxw2XpkVEE/N89oBBW5dFxMMAUImqqUkejSTETUURtjLIhbBXGikJ2V7KSFxo063hehn/UVDs04fMy3Z4AZdjhbe5eCftpBpLuAiqwjMNuv5bTrUHO+8g40Ys6tflwzDedCVwf98hjsfv9TuFDSG8AvmaMsUlJB5aJ8kWyXJ+aUwoFwYIT1nopAaSbJaLZSqRf6vdB07CtOgK6rfk0zEcirDKA0zt4i2Oj/XSg6pk+vnw8Es3Gb7WU19ujOxFvfbbM3F4/EeEfsO1QVtC1n8RljbIRJIz/T2geiBg= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(4744005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7UCi866kXhzQi9vnw6wqqnD08gGoRT4chVnepNNGXm/3JIQdkl2GXm83EX82rzMe1n/Ay2lP31M1svek2zC7q4NEzo3k/fpLNCMFNnxQrVAH8P7WK8pjk/4HA2mCuhQtWHbH8Y2oLz9oAeTPCLswCX9xo4vo7j/h6F1wibFhDoxKKygoxcgbhQfazNW+ZEC/rJl2DhwBw3XFUjldvLI2ZZPyNRrTeuCrhzNjoV02YnbEXs2S65M4c7BM2snBWhl9XavVfFjblx7QMopGwQHDextgPB4qxZ3mH5XdWW9eLWW/kSDx/+Ud9QTlHLBq0QxJbSMwtdOv0xY4CYBzmZjqYVtixaL0Da8NSaQFXVGWP1dIPrMJz9Z+I6wJoX1tfKqD84kbtzKf9edTlzdwSz5J8E1uGr5CMBScGdnzi4T8M3OTToSJfPC8xFqCT0jdR9vwb633UfTi3rBJOXsfPG2CyBpdK0bwpCAXgmmNlH+Pd4z+EjhpfGAxTxiSJNNlL/L8KMCXDKe5HuX3yRmTLIiCEaV0Zd/tuJHZXfPdcFvMufosQHu0n+rWxi7Sghd4QwOMhadc1xlF7xVELFz+pbuUTn7UWgNleW4xm9/u01wr1J7T53smGXqUQNuHcoSr7HUdWz/PYk4z+T3DoFh+hhe6+ml6Y0vD5yVtxGNnIjt3nNbu+NJY/nrU+F3ESjKgcM+k5/Q5XK675BD4Y8gYYfYdEFWq47dqIlDITwuwQHhXCHFs+aRpSGxQZnACgsGu2lpOvC5iIdGybf80Fqw1prQ7XQ0hWE0iVPAx8PhFC1jZ1JMFphh6bbqegS4YWEpdDixZ/1tfg/RAiDfZ5zn48eq3oHLNtOmv5LDcax/ZEP2RDe5Q72WW9oPPWwFJeVwMLs91s3pvTt2pI92p5+9OVU0qqJWg2l5hg77DkZHmbbezY6IlK29oD5d2sWL1NViwgq3Q4OJC8kSopjDWWVUho7mHdMoQ06dnP17k2QL4KiFJtg1EEYiS8cygbW7Pd1GHUCLAL9bfW6OmagzgS9u17wX1crmQVMYPY5mmafnG5AFpqCNn0DOpwM3kRtJBUstkAj0S8dAfknekPyi3IwIm06nyMX0SvX7bmlX/L+46WiablYYekuHvBJ5kSxlOfdVFv+9xQG+jIpNyrnvfR1qKqY+8Tiy643yk5sRQMvExTp0AmE8/doHzzjpuBj1kGpv/1Yaj1kj2LCGjj9XdRsoRLG95Q5Dk8tDrV51MmygeYw8T+8mGTNHyns6hQ5ymJCOf3JTMaV2lmlWjed68HSzP4Q8UuDEJW/pmV/0SxZf3AWejHkfB2CGY4y9NQOd3KPMAgyIYCmTGuUs7h9k8BLgnjYY9iuLrMGKaIiorysP+K5TcIjZeTfABcrPvzV3jlWwr7c7EcggIx3v3BRKKYNyVrgjKSgD7NFxZcW+tqM1o+lYjh/f6SUzYpcnDXNLTbNf+utR4TQsJzSi2lDu1MFJ3zhRuBy+tuLFi57mdO8tdSJ7rSp9xVP9F9t5cUypjm/LIlYc1WsdVApP7jQbIKMxN9nBqUQwDwYPtrakme8wtenHLHkW7nzEnC6KNDiljFbjnRx/L X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58163408-2c4f-4170-9264-08db810fab54 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:10.4131 (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: u4Zsqsn1aoDhGTJ2kygevMMPPK0GNnd8J7r/i91myUF2xRnok64DeIDksPkN40jxfxKGmv7Tc4ybgR7zPCDtXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-mlxbf.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c index ae66bdd1b737..2f60e5532b54 100644 --- a/drivers/i2c/busses/i2c-mlxbf.c +++ b/drivers/i2c/busses/i2c-mlxbf.c @@ -1080,13 +1080,7 @@ static int mlxbf_i2c_init_resource(struct platform_device *pdev, if (!tmp_res) return -ENOMEM; - tmp_res->params = platform_get_resource(pdev, IORESOURCE_MEM, type); - if (!tmp_res->params) { - devm_kfree(dev, tmp_res); - return -EIO; - } - - tmp_res->io = devm_ioremap_resource(dev, tmp_res->params); + tmp_res->io = devm_platform_get_and_ioremap_resource(pdev, type, &tmp_res->params); if (IS_ERR(tmp_res->io)) { devm_kfree(dev, tmp_res); return PTR_ERR(tmp_res->io); From patchwork Mon Jul 10 06:33:44 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: 702085 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 0D8EFEB64D9 for ; Mon, 10 Jul 2023 06:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231287AbjGJGeu (ORCPT ); Mon, 10 Jul 2023 02:34:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231444AbjGJGeg (ORCPT ); Mon, 10 Jul 2023 02:34:36 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6F0919F; Sun, 9 Jul 2023 23:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ys1SeFXAiJwZOe84TqCk4tmd2dLYuJVtuqaX7k3i9zjJeUbjRcp292LkYs2czRB6kEIk5xkG1mhNQJVF34fKysbjTW5zi/vulLipNmjrragAavOhlmT0w/cBIdw+PRNhyIJ4s1EM1xqRC4/++vm8Ox/m+47zSAml/6mbSyuJoH869Eekl0BAXwRwqqk+YhUMqkTkPTUEDZ22BYDU6qjl+IeGHfsIfjpPR7TmcZfWU51NXze54HGh66DxPpwCsDW28tK5Ltb6I+T5/pYJ/+nTANjJHrpBzcOTMpSu343FnBxomJWATDI7JBIXoPeJ0pFs6ZwmutOnMuydkpOdzDOXAQ== 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=+f1vLbTi9fKLjup7MkbKDY5dDT1cFKNHL28OvmqBpRc=; b=g78MwlYIOI9X322aPe/elSWVleHteNWBrDmvTZiKK+H/jhoH99aSTAUJedh2ZPGDfgv+rDGDEdYML8peMIxhrvGlDz9ju0rbDwQdDT+AJ+BmFceIzXv5DHzGUwsZNOHWRiw8OOCzPOjbNrIAFa0KBiN7h1WQ4GPnOY1pB3ayYNJq6W6slRcnpd+mOilBDJeGeMBJ0G+wTcc7Q9ALuEvt13DvmFNFjIL1Qs4mHPfWD5NGduzzx8vH5hafNZHT7OF2CVmxxpddYDG/ALbHqK4236DTYl5L5qksgv/n7xcY+GSMX6cAS3k3P21RCiMc/OgkvkmpQDfYfkY/qEqxoARyJQ== 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=+f1vLbTi9fKLjup7MkbKDY5dDT1cFKNHL28OvmqBpRc=; b=GVST9e7ZN4+iAfPMmSY2qXWLuRs9GPc0a4IMzZA1VF0u+KhMUOIyDJr00XdTX3TJXtRMBAmpU7hCh/UuBI/7QLk1g1nUGi6zbAln/ZgXD+z4IaZkfFcN4pY4ujZihZ3N2PNWpNpBaxYuKgXm/06DFfRHwIhfo0aHuR4NMfj2PXL0Mh9O1XzX86KvdirqYX/JWw/2sPHNMqJ+kShM4A//80jZnmhCW76/J11/8Y0WdohJZNSgNTjg/EY4WDL1Y7Z7BY8xgNdKExpsHcwWqvA20YcNisrl5qHSW15S1ogn/oGN7AJl7CBon+seh1RvYA4JB2gXXOUlWw4/GS79vt3pbg== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:13 +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.6565.028; Mon, 10 Jul 2023 06:34:13 +0000 From: Yangtao Li To: Pierre-Yves MORDRET , Alain Volmat , Andi Shyti , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/11] i2c: stm32f4: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:44 +0800 Message-Id: <20230710063351.17490-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: e1b9bb47-3ec7-4b28-33be-08db810faccd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NK2s5UfW4DkJmSLwi22dBGboh+d43WG6k/44NwpmRMy30AAjCzTdAGiAw+W+QdWrZ7/zHnQGNIk2sWpVG7VGt03hr4yrNAAe6llIdSHR54HVa6l5fmmsx7llyns5I8W0AJ7SwdRgIHM2FxQqiQd4lJQ/maVm9Kx/+xjofsAgaX/UmYliZqcLOwbGlvKDSq4tkLnx0WThAA9EuI9BH3sZRPskw3tl2yTGjdf9eYY6DflsCsX4z+F2rC7I9VRlAzT7Z9SINE3CgRCptV2Y/WA8RTrJ0dVC1hJ56KHHhcYp2NJ/KvURepecWT8fbVxcbxdYX6/hfkF4Zlie6E22Me1GjhZsleMJns/bZxRCMySJOXP4GkErbHj9dXgcOSu6696szVZ5ZdsbUmyHUBuNfbCybDtKqnvCywz7q18ewieUCvnk9JRIsPNN3Wztrptq/vuOpH1amzgoA9psRbI5AAIaFPJaFav8plieM0mTNQWRxcxKGdVus2dADlxn8A/AeDqNNb5Zx9SRWyR3ZyTWRRz/bjvy/2RZyynF/CeOgph1s9su4P7j+dcdBpj9pNLPDz2Xd9gRITWwI4oOnZM2oAUlYZ6z7FsxtmWPMcB7oH5dvR9N61cRLicD2rCCnJpDgIiAkrSdfDDe45kTg3Ka00lizKT+1DpHMhJx23e5DYUCSCA= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(4744005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /cxawpr5qTScAAQ5ti5ksHqIPz25jOE+zsGPosZeRy0AZI1P7dYxJiSVvjAT2WQs7SNAW3096Adekm9srCb2E0CTgVITEUoXwEja2GjY6Lsb6lIK73iXnFwuTDKma5xPAsoCBScefbCWxOKHnjRCehha35v1Jv+YOOGvWrue+i7Sq1QRRqHmjdXFnVvMw6hu76UbmECtyB4DnORYfR+8NQLSBxX0VjHXYGBhVvRKoWXklEdXeTiiDIKCBqHCWDzn4wE05bXl+IpdrfcbdcDlX/JZVB/K5zSJNWIndUrxyyMdrW3kaSmtcZklpd4c9iQb6/zmhAk55lmMs5vBFJ5CaSpwi0mu9dnJt5+9t2G5BJPpVHRkeOfToY152hVNlA/62j1LTMaTFj+sCcoqK6Keiise7tgTCF3doctvsj8hxC7NFenpLPaZb+FihrGCF+DiuhW7BDsK9J7ycyo864oLoYzk72snQKsIlgb07J/InlHFQ9ytfBVShYaG23SR+ryVs98BszI/03QGUu+7aYYnbhtTdifMRjjbAggZ/cOq7ry58UwVVZchyYU+ibUeF1sW32OwIOfwwuesNbcMbckzmJ5LUKg3B2gkILkHAB0EUTwTt3EY/KvPr44dVUdy3bxOwUeFmnM2O55lOCw7jHjXXovapfTX+D1E/f5rzmvgZPUjSaWVlKxshwzP2LMKkXR4Tc7LU8mtffOJ3az9XhoVsFjP5jukTG9Zlvuor4c+OyF6+oT2jiv7jWZdOHsZcLyQDt2kX/ngHnCRhVe6kXIdNEX0588dtJDX8+Xe6n4CTpBPA5gLdwkQ4dgHmxJasbRJOHqklqQRX/nqGXqMQzwthjJyEHQXF+vPg/TuVR1yWqxCp1YM6Om5bxpJT13rxGfMYq1/EI2lr5irrU8GOyrHq9vIivA+o+HRd0A4UiwXDZHu7FH6sHvdnw1En91D8Mw9UQmDBUThqeCaG2TpUSJmC9KfUbTDbypdWa0EU+MElxmIa2dHoywbmzK8CuOejtk8yYEXTwrdDIMJidXXtb+n078HP7yQfQRiA89hnHNd2sCenFartENCSdP/aTARnYpzRu5rNM21SZi0BHEopgLm28d6oR9whsbPG+KoIberKbf3a6izIt1sHm5hsIOFDWqE3ueDjnUg9NHykdUgkT4cuCxkt6OVqUGyOTejhg4/Ao4qs2K8Uml1AMk9hyIhBva02MRSCP5iu9NySe5Arb2b90dWy9iZOdqXVMc+kdwbwYEbGogJFlnD0CK/o3iNr6DTKIpZ57P5P7MC6Vz/WI7ylmUD4XSll1OzaKn8P6fwloeHaTv7oTNilMs9lbNz/nZ14LuN+AhaQ+3aW4M6aw/esmyQr1DsP7db4Qv+vnFzBD3bh0vIgS+6AG/qa4zZvSxwogx3w/j1FFgIdXZAaz4ZEA9Ihn8plozlqUmOSINt8DpE11mKL/eHskZoPii7mKU5k05NeJ6b1FyC39WlTbBWIle/tGR8kPk2nhTWzAyY1K70gZOLcAuUzqo1cWQvndBlH2fewcKhiteazvnKoalUDVDesUYfWbli5h7EDFegAM1eXsi22EE/ehogzKcgDllc X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b9bb47-3ec7-4b28-33be-08db810faccd X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:12.8733 (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: T91d5wrbTEGd3hdgwXP7VRonc5O6YjfB1hIJEgYpY8WHeleScogdUHwIY+tIuFO6W8VZ+OTQ+TQ8zoJ0+p2pvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-stm32f4.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c index 6ad06a5a22b4..ecc54792a66f 100644 --- a/drivers/i2c/busses/i2c-stm32f4.c +++ b/drivers/i2c/busses/i2c-stm32f4.c @@ -767,8 +767,7 @@ static int stm32f4_i2c_probe(struct platform_device *pdev) if (!i2c_dev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c_dev->base = devm_ioremap_resource(&pdev->dev, res); + i2c_dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c_dev->base)) return PTR_ERR(i2c_dev->base); From patchwork Mon Jul 10 06:33:45 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: 701361 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 AB5E4C001DD for ; Mon, 10 Jul 2023 06:34:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231228AbjGJGex (ORCPT ); Mon, 10 Jul 2023 02:34:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbjGJGeh (ORCPT ); Mon, 10 Jul 2023 02:34:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2103.outbound.protection.outlook.com [40.107.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E6FFE56; Sun, 9 Jul 2023 23:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gSSkzYRTuk6VSXb1xheNlM64n+674HQafmvzCkTFkOGqiqoajVuEQa0/ntcw9HwlV/UHjpOSYon/uJcrqgDA9/3jirz6PSU+8sXFyn+hWn0QWLecRx04vJ1p2SPuvntqKdSmpCvirYo4e9gSkmATijshl72aPFfn4GtKFJwvFzhie7PWXOxQPU/KOVs6omKm9lAjUpjWLwhjkxOqtl4/uEC69AnOYIFYiZ4W9js6xNybpmU2oIvk78PUfeyn6O7BbAeZHyux3Vg6lXrNctBKTa2DWQY2AezdFGJeIz0JAwbWDL46YOthlVKjIeawsfIZCGDo2wHm2z0mtroa7Dm7Rw== 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=tdb26EYaPAoprJFKtW/qFt1bUD6rf5cw+jKBZQC71QQ=; b=k5E4WXBRbEdzadbPzanbwQVEnEG5G6BizJs0tTmSrSvHkvQMHXnS2sw2uSIaoD0068NPXKlPcuUar4yijOhIEDTo7M+72yiRyBn2jkDyqaUyV6njktnEjc6Gkm27zhfnnzcAlHy0o7tYRfsjk1V6aGWI26Fs5I0PoojJiHXHtSwK7s57iHyzNo+q30qPZ+tDqiGeD3fVTfgfHeElV8yE6cyJLbaLaCVh5fKTgq9gd+hTGdVFUxHT88773lKr2O6MLzzYwlNGT9bI+hPcem2bNOfvRiTipme6TyrZUyZxH2Wr+8iDuyYvb3SDNcKXqRHkrk0M3n2eo7iCYGgyrn/iKA== 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=tdb26EYaPAoprJFKtW/qFt1bUD6rf5cw+jKBZQC71QQ=; b=mabQYwHghQB4bFolHew9/efmWbZ6guXuTHKMAvr3sa+AzWnCDEuoHuDMl/JJOMYpzaz1hyFqDx+5Yy/eZTM3VB/3FyESWGEakzZWNdblnSl7VOu/DxB9N9D1i5SQlcwQlrEVi/Oq9yFH62hKVGnME1LdQG/8tvGVOWDsP0hTQRvPfSUsAuNkd+VuBCft1WdOjsOh2Hzs3UEKqhA5+qpzoeutDkRrWi+nUrQT8CZQZ3VQeF++4eWzWJjdH9HxcqE9RczGRv56UH50+kuNldW/CjadMnFwLKcuiSOfgz9aSADv/4f8lEOdv2n/rk8vIjGmU3v5Muza66eZe3JzVIPANQ== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:15 +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.6565.028; Mon, 10 Jul 2023 06:34:15 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Andi Shyti Cc: Yangtao Li , linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 06/11] i2c: qcom-geni: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:45 +0800 Message-Id: <20230710063351.17490-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: dd72630b-db8a-4a22-1388-08db810fae22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r9hxxLy4/Zo1BnrR1jFjsnktwE1OSZX5QwO1xwcsja4331jE1BdTCE8v+6j2cDMQ+Az+RtvOvfZk/FQAJp8ANg00fhGvQ3/EnHuVHt4zuGDnhizCirvKJ+1z3eIYguh5iMilOKr9UylQhQ8+i3qw4yBkOl8aSEKUgpnL7vuJn2IlaEr+TCRsm90M2p9rJFNdqYqT+QWzo9RvaVkWvOOl9tvSmENtX/IZoF9w9wXqkJerwevGNLlX5vTXWzJHcdXds3OCXGuyaEa4U3oBDT7UnmfHa5du8WTUW+pdotm/Q/XJerC25Axf775AeRHL/UdKbfqz9eupoiw8FGBIg6+4g50yb489edW7++7YSvHc/liOb7vfRRcekEo44yOc7iopRZIjMeue/PWqIXM0UpDv/eVu/pSBQ8+1n7INWyp2zOot+558OON/b8Um887UL84hoS2KVJNX0MmZOZFpECUnTyXhr7+2V7y5+NDDR8dpKveC9BqNXx9/+5qrWsZfc8jhINjz8PwRi6BhfK8cbNyy2TJv2wNYPZvB2t+xIh5ybsKQ9os/r0v/8Ua+aj3m0J8iJYdpsBJYb9r18I66Nx9RaYI6XsLIFu+O6xBHcah11waImcp8Dh8ZbtLWrXLUW9ZDP54avzm6yoe5uP/bNK3Cql1O8snNlcSpCjYtwPBR7Qk= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LNWDGnA1XAKixWBrA/WgVfT8L0PvUD1RwfCvdvdhEAXFbNdZ8Ekj7ZECpbxwpCc1KKQqwupgJ5d5DtXGWjv8onh5lip4OnRHbFd9St3DHRhwR2oA+Gs3IiN9Dc1FUvyXULd0E3muXyvHSmw08b4QflvxfnYgrG/1n/MdNYCNDZLq0PqLYFPPvK4LtNRefrBI2hQkHcfiz4G5JvaoazdvJLFXRlCs6klHFdKXoRPCZS1BmXy4hWxIF0AOT695L7GEH6iaydKakMm3g7RK0HmYZOcqxQxNwGNuY8GkwZl+Jk6hixKXKF3R0j+dFaXLEAIueijXAAG+VtsVZYWZKskUzV4q5ctcOSn3LwGAiaktRUpd7U210rXbUVNMF61wXwSWo6QeE3yLDBOcNsW4XsVAkgC3FY7DM7nGI3aGQwRmBbB/JD1+JKob1g2GqpgVs0klh28hy0YEZmnq9T2tdvIblvcrLdFuVHRvzgJc7eAdAgeRWCoNLNFs2C3jB7IiCwpGIkJtYzraWjHZ//w6Ck1EdxjuL+a32OzWaBQ/GPK3hkpSx3qdJ5fx7ExJ5GQkH8Lnl/37FAnExvWHZHWu6J/aa2OC6Z8fe67m79E9kKghdCSKCJDHxxRizx0xVj+R9MuDyxqh8awiMd7/gGgi/nD/n8L9863Q+WX1KfH/PzqM+CW7f14BMSGjTrXMV7wyXtXIzPNTvrInyUyrv0dZNj96RP0VK8Sk9WwubKjUCUpBQckDSAldIfX1SaJFKEx990C8U1tEm5wUfjTjJkz0c2p4gU0AhoAe5qL/NYIWZyKIEBRZ6k/U/PwFZtIMQC9A6K1Pv3msdzPafWSsmM0FMFmq/+usAaagf6aosLXIaKRE/U4ay6NWR/rRdrgHj3sNHgxrI1bLZWjI/M2llF1d/fpm6InL5aKpfEqYRmFOA2cQMmqTRjhAvgVqcpCeKEqPd8BKPGcLhAKygAXo5XcXi7t9AOTlSiwf5uvmLDECq4r2JMwDkjqTC0c7BBcJ+4XLflluFlvbWTXI36aq/nRAv34Mw/mTGngZwbc+e2Z6F183l8rinJD6nSUDDrxbwWfpujABnUViD7qkRFBAu9My1Gw5xCNTTgPMGVGsApdiJ4NVntESPAh3pKRMRhEa1vMz0hYfbm0PD8CREuqO1IYono4N4RXPardXmBK5ejMeaj3ja4DXKxxaQYipyzh9PA7a6SWfbBGG/FDdKcq6dTbGwT3UD0LxuhnxvC2kt7zvIQnC7dHOQzmooXrDB6AqBiL/wMymbjt6tViJE9Z2LkuESIXbEzlpc1IC3RdOcnQMz9v0xRLYb0vet1sFTtp5EML6hljWz/VsCwdUTalR+wv0fjyd6Qg/L5z0qB204ZSQ9j7wmgoPDXo6NpR5xGPmVcrONrsfYEsrgPHdf9dktmhMJUpSbnbqMW9kgMpvUefR+8OpW+kKSc7M+YlrApDEqNaUTOuWkrtXK4Ratui1GEa4thtFct6Cra0veE7pc4hW1dwt85ylQR46nhDofUaogxT09sz+YdSyYVzBaxmq/fkxSOmyRBipmWXAnPVwDO+bSGW9Quqq6P/IVoc/sq1PF8qtLYus X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd72630b-db8a-4a22-1388-08db810fae22 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:15.1261 (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: LWyxP8IV6GpFNuhkneUIL4aZhS1DbgxIKJJqijOrx2PhUGn1dVr7q9ogGKnNqNS6VFU/l+txwUVFkbFAi9mElw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-qcom-geni.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index b670a67c4fdd..229353e96e09 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -767,7 +767,6 @@ static int setup_gpi_dma(struct geni_i2c_dev *gi2c) static int geni_i2c_probe(struct platform_device *pdev) { struct geni_i2c_dev *gi2c; - struct resource *res; u32 proto, tx_depth, fifo_disable; int ret; struct device *dev = &pdev->dev; @@ -779,8 +778,7 @@ static int geni_i2c_probe(struct platform_device *pdev) gi2c->se.dev = dev; gi2c->se.wrapper = dev_get_drvdata(dev->parent); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gi2c->se.base = devm_ioremap_resource(dev, res); + gi2c->se.base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gi2c->se.base)) return PTR_ERR(gi2c->se.base); From patchwork Mon Jul 10 06:33:46 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: 702084 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 C49A7EB64DC for ; Mon, 10 Jul 2023 06:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231514AbjGJGe6 (ORCPT ); Mon, 10 Jul 2023 02:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231521AbjGJGei (ORCPT ); Mon, 10 Jul 2023 02:34:38 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12224132; Sun, 9 Jul 2023 23:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BT/uSV6TSHVZ4+M5WpdwjFeJQuO91Ty0eHEBOZtUjF6b0Du0csbj0SiU4lnQVybEQFMRZsBLuPWw/AZdEwpUH2OYCB+nZWnXS+PqV+nfz5gFK0xtuuY+KSLadq7rVp1uBMv1wN8ktgM2R2UWpfYqrdb7zEe8HofxfpY5XxspXA5j7+WqkyBd6S7LX3UTKTUXQrnGihJk9f8vim+JWVVh+LxzSnQDy5aI1Q9rp1JWsLDsgUvR33F9hBVpAOykOEaHLIQgSMIbCCyrTTBzPal1NIL2cvdpBcriAe5eOebBlWFYH0pdiMVETu3j+kXxUgm17ps/PeKz0KtugK+OX5RF5g== 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=WUqjCw8dJAGGMwXpKJMBJI/YD7X/PDd5YfI8Bg34FpE=; b=C0NG44gAIhEnHzKmN00EDN5EAzptNAF51QgDwaV89hLMLD7hegpMqn1vHygDmsErg7pNApFeop0z7UPE5YlGUtpCfF9ixfh+DFyt3ld+XDOcW4n6N8+DGb7MBpXlbow0dQxbqOf7Rg4vQ1VamcqUk210viZy5Ofhn6npZlPizQ+2Rzz/jAHzslvywW9DYYnpsdFjEW5u/r0kk+FPzWIDu0Mjnmdr/9ptZymgnSLmITwuUeP8MVNg4D0kyVqfGK0GQJGfElGUFEfohrGaQoBUwmLRq2f3CCgYeb7EjZFkGvGzuFI1nG2YtMGJWtgzPTMWHEepJcYUjftkJTiHCAIfUg== 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=WUqjCw8dJAGGMwXpKJMBJI/YD7X/PDd5YfI8Bg34FpE=; b=Y38RaLhqqHVfwRt6lcAK63/nkfOd0LKwnrJJRtJl4zWLbtgwdqzaf5vhqNaLbRlrYuzCjBGPt3Le8yhMCTezeDxLIUfef7RIcsJk7rhh8PExqDUPyMbvsSVB+e9Qaqjh5P+CvSXgeAVdJQf0rCMq/LaBOFt5iinAX8gUGKuRZfvll6WVAgV70g17Ywa8quUdjI0wG6GDEcQOzR9Epw3erXhIpwlDhHyGZyafTGZrHqH4lbj6KzHfCU43uSqKarVggkgZeyutUBMV4wA/bydzUcTHCC/e+jY06oxWBxd0QeitFWLuB5RmRt5SQg73NuFEyy/kTF65jCTnhnT4/wfIwg== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:17 +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.6565.028; Mon, 10 Jul 2023 06:34:17 +0000 From: Yangtao Li To: Patrice Chotard , Andi Shyti Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 07/11] i2c: st: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:46 +0800 Message-Id: <20230710063351.17490-7-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a489cf7-c059-454b-e470-08db810faf44 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DUncLV8B1Pcj2/iL6e94ayagATvX1QUP9obUsiuFiu47F0jXB0lTbQWeyto4tsQe1xWSys/2StgVeDwCyjXC7W7kN4X1s/qdiNfxwckxlPfhEeczpIXeXTpxhOI4sG4uAhzDxbrk7tGGE675V7XhSlrRdcT8SpoVFQBtub1i3mdpgiRvjhCUuIznIU+k7i9XLq4z8mk+oOsrD5pZ8kB3vUZl+puAQ882dHw2Psk2hvdw61Y/PJqh1GpVipaIkjaH8RN1GzzqMNb261oTMHqnvZmYF5a/sNflla76+vE4jtA7/s8GL/NHM5oQM+rmE+Ksy1B5ezzq2Xtva5wrRqfxhJWpT4k7NXjMYZKjk/0/J1rqyz3xvk/ZDG/0WOvTSPlvJvbHoxN/PTo5bN/y8oOCvQ/OAOyV+9HrUGLwQLmpqdKJu62y37gXX2EDU70rw4e0GHUnso3/PPQ+sxm9tALUVJTxzqDoWjsvL0KYMjrCtUvs+LGGkND67NAfA5xHYWO7YbHICAB0giIqAY0feSy43f/Vy4/oG2lqlaOpz99R24N50S4h5d3QHgNeIoFyUG6ajyHutQWsaOsTc2c8PSFWKlC++H0xcYZ5vvN61/FyG9pY0UZtIrzlvtZjNrjxvkULkHT69zwbV0/VC9oo/HFYuRNIQR5ZekyCaH7GsRAPAD8= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(4744005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kMIfJWdlZ9Awby78mMjueRsHJBQYUXpW1G8DcUQhhUdo55tzPnoEx49ouBSQNN4i3rkA/L8GeiLFPpAtxbEBoyVP6X/p+JNjTwNv0b7Nrs4AgnJuk0Vxm6MoobNtcrw1D2eCUTUFRepjZhwu7GUMrglBsASFTXOM+CtJeZrkcxlYvY/68C/y2R9h6p227ZCTPkn+PUIvOawMC/baZlXS4qxep6sLV6fswaE/NY1vvgl4VgyOt/dYxPPsA+3xEGJ6Kf7u4RJM08sKMgmF62asmz+vJZSwzlL6cqeNxa76EO068RjIXRzw46jmhnsEcoa5rO/Fle1GhGpeIYR4fDGejEJJuPQBUE4+KRQXuIpAq0LWzMp68yGTEQlmQY5lvcuL6/wbLBaEWCMwAt9hbQSpPk32EygLQ+ItBF+e+m5n2JXkm3Vs8hrR5RowQLvTZTBkA1bq8rh7MlkJt5Rg7Qm5luIbF2KwJkPz6zNi+daTYfqc7htIVK9kFGZ6KgHi367q6quHUs9TYzMhjSH20SovpVi3mk3yUkHosR/kNf8AFyx+jn3EpbmznYVW/mXG0hG7vXMbQRxIXtr7YL/4oEVYAmWIu2xJ4RNcDFK31yPkZET6an3Yr4D5DX4Qauqbl4xR0nkJgF7Wtyktav+Rv/ajYwhqWhCExRediHCsTFcE/SYMqPfYEP/VT6qkf4SB36qQUYrWoKTP/cjWlhgpYdAWeMQqWGynsChLhjWcEVj+S0j/M9ndEINrYp6U9fMCGUCvK9cmmrvquh8ewJlmcjkXbm1+gQzlTzYG3ql9/XEJ9OH8qN9eMfpoGvje+1iyrsQKZLYZzXXHaWoHm4CCZd7tVt2i3ME4/QhhfO0Kxaq/ceOcc5r5O9/YUSe5FrRuhyCAYduiD9My8JZaDP1G45m6er7GuVfyWPKj9gN1e9lL2FIeL3DbWPXf4hOyckNBrwYgs5UBXXnz9X+VMw/rsqn96IntW52r3V3UIky1Vp24/meYAUSU26ZfjXsndC4sT1Tk0AUIikC0rzWK+HLeydkHeKhvey0CW+kVxpGtgUaKeQX7GpMKRe/BerpSzLai/ZTker3Tg3WWj4KV6ctzTg0DsHV55iVFHqwNLO0zph6wJHdMSp2/tmKU9Pp5TX7K0lsR9Cb6GkApzBtHxaOp8v4YOEIXYJLc9dmjeG5o9VRhbkjZdtYfMLs8I89mLWBS8aC/rgnT2ehxJcy7efv6L2sj5UvAYHne/LHfPCwJ9iVPB6gWQ0TzOc52fAcn3Etfhq8GhTetg1cNBdvn214G0EaKJlBH1zy0S4nHOgJ0Qw4DcpIcWVlQB5ptn8FvCrOOpPoAAooGBXo13Vw87eKKiVs+0/Pg7ceO6PatrwU4X7sNjlrujmBfisEacjwXPyEXy9mJkC4DGZM3zsKIlCzWAZoTXJImLhZGYJdOiJvcue2j17KptjEzp11NBTV4Cl5Z4JS0N/nLXDFf1N9Wkx7vX+jcBxhOcN2s8jdiiiRVgXqwfMUvO8EclLf06hjFshw9XqORxe2knPc3QNkK6GDieL28WrFuQWY7e3EJYQylIVb+sa2Hk6yhf9fmlNDJfusxj6BH X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a489cf7-c059-454b-e470-08db810faf44 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:17.0154 (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: TrEXwhXuyklXn2vhkPfls/V8mXVBaDJqBI682sy82N8RQijoHCyHgWa/y0Nd72Y0lFP7UtwjxZpKYkgsDj5x8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-st.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c index 25c3521cae0e..ce2333408904 100644 --- a/drivers/i2c/busses/i2c-st.c +++ b/drivers/i2c/busses/i2c-st.c @@ -812,8 +812,7 @@ static int st_i2c_probe(struct platform_device *pdev) if (!i2c_dev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c_dev->base = devm_ioremap_resource(&pdev->dev, res); + i2c_dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c_dev->base)) return PTR_ERR(i2c_dev->base); From patchwork Mon Jul 10 06:33:47 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: 702082 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 7C387EB64DA for ; Mon, 10 Jul 2023 06:36:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231738AbjGJGgc (ORCPT ); Mon, 10 Jul 2023 02:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231497AbjGJGgR (ORCPT ); Mon, 10 Jul 2023 02:36:17 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91BD719A5; Sun, 9 Jul 2023 23:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JoKXb4jnSD46YZDyEscHSQi1wlyYh1R+Wi50tkyzF4dLrxmaqgDOy0ukmu5O6WgZLX9iGKkr4kWxPPG95oF0BtPlXzV9m/rLCRvTrjkO3b95XsbCzMc5PomLJ9hK2hA+gyQBlUtKkClVOtzq+30weq2vtzyiOBuwfqvSuJaUQUAirBkLGT3XIsiUB7gtUZQZt/1g6joRzkf29umuZVXUF+NLmPsv4jqtau3V2FNgT1vJbqNsMcIXlD2c/+8wXY2/VR6ieRUDbX3t2lkZkOf6StyLfgq9Ks75Dv/iZmLs1SnlVJ6BK5PuAD1T8WPK07ncSkHkQ9C84aEWSicnPy+Pog== 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=wEXyr7CCnTvij27+1OkJm+eQgTyZidz8WdhtGo6ZdJ8=; b=Li1MkXXfyZBe7jttdrWVHfKcspf+mzulPi52Is9Clxj70fjptxV2nhBEE0dHDs/v2l0MEGKJVBODeN1PLNbwQbH0cc6ka85UxjB7SbHaLmqEPwQToIFDqWk3NnyOqfFXDYMgr391+MpJ1ZEDDSx+UvonIBwRWuv8UtK3U9XAKoJ9gnZe2n20y4eC5/z5KA5q2+s8WTgB9iuLJCBHP4Rmdcr+/jp0jQE0vsSL7kfVsgQR0rb8qB7rgWqigVt3peNzVclKU8BRdMl0zKeft9NGPlu8psmEgay4nhxVmHYQ8iR8DMtYy8BzzmLeFpRtNCwvDQEUJfHa26Yjc8JRotT47g== 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=wEXyr7CCnTvij27+1OkJm+eQgTyZidz8WdhtGo6ZdJ8=; b=Wf4f/HCQrc3hcoaW4UE6cG4oX6mykvErsvVOas2dBIMYTq/w2BoeNBjXPh2dqkvVgocgWG8nhBYUKO+viwyyUhZLKq6qfEzHxFZXyt/KNLLJMEZOt96TCU5WjxGE82Vib1moXf1tlTGgwOs8U5jvANGV4hnzJUJOk0VZiDdqPysyy3ZtOooPFLGZ1NWvF54azbT24e3RKVg/xcaK+3GYvFHB8GqwrpEXfZZgfL/NDNUyvF65tleVPeam5p1h++Gy/yRp1tm+XprJbCR1ht1aDCYhCdSPkeps+eB6dn5WwHNf5W6uCD0IWZM1lhLbkG6by9u1nYrwU2sGWCVcjYztmQ== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:19 +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.6565.028; Mon, 10 Jul 2023 06:34:19 +0000 From: Yangtao Li To: Wolfram Sang , Andi Shyti Cc: Yangtao Li , linux-renesas-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 08/11] i2c: sh_mobile: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:47 +0800 Message-Id: <20230710063351.17490-8-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: d3b6e916-187b-47cf-b256-08db810fb086 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Miln90ZK7E1yzZ4TTPEU30fV5Z1rOzBGw16wnXr7wrSsELX0XSxy7bwZHkNMuE22Glw6wMCMXXROY/1emGljzouEusrg9aiuso9cnEArqeQl1bMlBRqZTgb4yKvyEsvhq6pn78/dPeNmb2YFyTr7/+N4gxo3nQKHSaF8h8A/KA/7QvMxwcrQLTYrvo164KpYRyXOKFo6pvun73S3LHHbXNYcQXH5zLSIqSjUQK3rI9pPHjeQxH8kjhJ+9Ddn6HgNLAxTfCi2QpsJPBT7C3EZDv1NM98uBNL8nRh+1Bcu3nV/evI0QOc0kly2LF/t+DaVxwqZzgOYz4p+AS98A5fhwdnSM2ZamtRHvVRTmrZWK4Y8vSf6iuoeAUuy6IiieYYRmXEP0bP347IrRbiOHpjM8FUoXM9tdbCR6uITq3CLObO7oaA2VeFdEyqHJDjQVrshGeerPqNBguANX9bcTqDjX9fnqTa/074w3n5RwjsEQxtwI5MiqJL7jRo67BnSVvghinfr1hkW7rII0mmw1AtQCg0pmOibdfUJXK39taNR3zy8YV+HCtLyFtdIn5DEurc3YhPLQYyeWafaf0lm4RpRxOeIme4gSFDoAIEqEwYiM/l3hddSGwYG5O5Wb8vNZ4HpkzNSoNKfHr+f8ULapTYEqs2KBc+VMWmNUSaVC9hy6gQ= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rAqrp5Bdwi2IDHV+kkeD94DcChMx2uxlQL8wc+S5zKKQ1xcERVYgWAjW+Zh3T4mUDtJN8879n7nBaJ68N5IVbcwu8YvY4H20V4579GELFpZIKqG/KItShgt7lMPaPV4DtML0xCFo+Jf7LDyzW9ZmFllxCDqCb1AZAk+vGaa4Igxl9YWimCrCCS6BESt7qNXJw+deSAkSC7Lu3ZPfcpDZTPAonbICTBP6OeKFicl1JX04TMm+jP4nPdditPQ8zgPjLQRsxQBFI/eKzRgG5fKcth+coDZL2vR0zPWsDowM0AuzoieKTW/D4CHejhLuDelulTipu5h7ES9BFDUxGgOFTDxS2M/2dTo+N91NgjdxwU0keD1itdmxGdxFJ67uZeTpM8zVdpbxYl50FUuTq7gon6zZrJOSdSreQ6hvLe7cB/6bBH1Jg2xPS35jcQi6rPxRKfhH470jnpNWSHPCDhDll+4FmEP4H9ewfi5T5bhDuQQVvc9j3pstKRX1REKRamEuas3Zghdb+2ael0V515yK3d9mfAzqpt/TunWieELOnPOa6ol7j9O/5DOCjCpJDDiAsz5oZq9ucXr9LwKLm5ZeItn537NGflP3kWUuo7CsLYRK0hOSqShRE4SS+7HF/laKLRE6+PhGmjxbG9u819dW9oUD1ijOUVEQj/DoJO67JJY1yQI1r+W1QgHl+N15gm7ZuFThsYlV9ssMo+HHK9z+E4SnzQ3Jl7Py5lVcLSqhy1KK3vd2CbxZ7nLkI4NtBEj+sTApZb57JIMfm/jfhoINYhsH8ySa4TT2H0PMG8H1h1khUY0+Nd5Bq8fpToHzoKmhDqcyg1Hy2folr1Qi+mPjB/7f3xIKPRApZSFqTaDrWT93deSPBs1LHQkEDlOWVJrD8xJ8XZgbjouLzIlfCeTgt6Uhn28z5E/Wy87frmmH0kv0I7cON7CU2yPmdDYjBfkj9VpAYG/AH8Lvaujw0phrSZLirR8utsYYa1mFEqc4O8o+YbJiUfF72171/Pdz6cihciZWibvVzD50U0CxbLqQe35oAJMqqla699b7nOKh29l3XDGQF4IriOOBUn2u5zTa2am+9r1ecKXS0hLSkQPna8EXt8/8w1UJ+oLbOrsfLE3YZMaDKen96+au0/sBlf3pQQvJWObs3ZnHWke8PRccL/Ugaa6xc6D6d23vAyAkdSyccoBVWv40cSOxoFMTYvEtEOYJXNsYCybGb70cxw3LI4Fh/UHd/kMbqSGZPwonBAZe/HxemCxo7hro8F6NJ5WRvvnzceWmoXGb4MhEkDtUsEu9Kq82BPysbtkJTFpeJocX5qUdO48lfq25sRXxfF8i0saUdjvx8aSubtuyUjT9uIvUjxHSi7SzA0URdtdbZszjn7QvjnOIfTtJT80ULYsYvz5BKzGtlOCYq+eb3PrU4++3CMMoCCuPKiQigq8e0lCP9szvTGYjTOyVD3fyd6OCCDW0w+ElQlFgPSaM444VUJmcg127Nw8NVHmvqCKfMN2CItFfRAI+SHEzLqByeGLsGk5vwcMDtRyrmAkAS9sQPt8Pe5fLf0wf0tra7KP6zO4n3nILRA9En3khg2kBLoYk X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3b6e916-187b-47cf-b256-08db810fb086 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:19.0755 (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: 6sQQ9iHIdsMAri/UivAQTCJ3YrJpMz8cLpYBAJGAI2NkP3URMD710iwzbB+fBfwfFr0yBhWnR3/MMfIZ3n/+OQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- v2: -s/devm_platform_get_and_ioremap_resource(pdev/devm_platform_get_and_ioremap_resource(dev drivers/i2c/busses/i2c-sh_mobile.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 21717b943a9e..163fc118873f 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -871,7 +871,6 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) { struct sh_mobile_i2c_data *pd; struct i2c_adapter *adap; - struct resource *res; const struct sh_mobile_dt_config *config; int ret; u32 bus_speed; @@ -893,10 +892,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) pd->dev = &dev->dev; platform_set_drvdata(dev, pd); - res = platform_get_resource(dev, IORESOURCE_MEM, 0); - - pd->res = res; - pd->reg = devm_ioremap_resource(&dev->dev, res); + pd->reg = devm_platform_get_and_ioremap_resource(dev, 0, &pd->res); if (IS_ERR(pd->reg)) return PTR_ERR(pd->reg); @@ -905,7 +901,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) pd->clks_per_count = 1; /* Newer variants come with two new bits in ICIC */ - if (resource_size(res) > 0x17) + if (resource_size(pd->res) > 0x17) pd->flags |= IIC_FLAG_HAS_ICIC67; pm_runtime_enable(&dev->dev); From patchwork Mon Jul 10 06:33:48 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: 701360 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 21A27EB64D9 for ; Mon, 10 Jul 2023 06:35:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231574AbjGJGfR (ORCPT ); Mon, 10 Jul 2023 02:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbjGJGeu (ORCPT ); Mon, 10 Jul 2023 02:34:50 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B26A10E7; Sun, 9 Jul 2023 23:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DYi+awHXDQG4k6p4IoysMfkApYWgNYQfTc957EObkOht7mHQ5oT1pMLdHzNS4rmLLWD0R5T09ezlqb7YZgv9LDv3BYnYNQGVXXW9exFOWDlOaWJWopDIKZI44bUI5o1eCdOcsFpnxDyYN4bH05sAyXYzt9O9GUqyVLva7XjtdtkeY8zjnN8ka/A3luk/psSMfpczbLWbUfj3PHlkOX3RPnnIecynqKM8o51Pa1nicP96DPl1HHhm8Y0He/8IBRohfJH2jwOEF5H7FjLuGHOdq3n0SqQQvZxJUmXjysSLsanObkYha4js3XsRK8oJxjAXun+6hsb/XyMpre5KNamiQw== 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=zi6TzN2hL0vt3qrUYbV1lXQWxJA8TiWxiQ0uLCPdZRg=; b=PBNC0xE9kj6/24BAY7LRhuBksyBQeEJ8DJnnpH5WHY7O6amm1eyHpEq/S2Kr1bXqOmN2ybffCrm1XxTkCAIUcP25hhzORKP126FSKphddbfPtfUvSASucg/Dq6YX+j2C3zUOu54dP+uQddd4ecpoda8NPwNYA57foG00sAa/1SHVkRj8+N9RoXPHSdiAGJHYblE+jGRWHsOc7wqcxO+ztMYmm3JXpFVYLL0KlO04hy0ldwVjZRzmeJWRJlOZHmoIbwHKkr7UNyWagDF044pyNHQngpzHeSGAwcegHEMvjXla6yly1TOjHH2K7tmYFFg2P8mQMHbO9BJkApA8F9VqZg== 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=zi6TzN2hL0vt3qrUYbV1lXQWxJA8TiWxiQ0uLCPdZRg=; b=AKYMt+i7iptr1bbXpuEj0KNYS0cPQhQhmLDY9BCErfootRxuSvAC00DYOTl4NPITpl4CKEJgzhK3mh8gNBz5YQ1uAyOzFrAKPgQ2B2H3Ycb0hkqVZY2zKceMkOpUpj8my8ULOhPJVztyrV5TDjv11aMYbenaXmaigHvZvgKifL/KKljFbdVpvDP0cnhk+7ja5bsralSKe0ATjVECvMhG5zBEeegaG4v2Rrf1+sa19TdVXrpNV6TFezKOUUJjDSNO4aXllxc/jngdfy1qPzYD8eJHDtelHGnAFa1T8AdSvgkbPXSlDAtlPVzTRoQyzCKYgXD2sSH9PFHHdMzFExjXVg== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:21 +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.6565.028; Mon, 10 Jul 2023 06:34:21 +0000 From: Yangtao Li To: Krzysztof Kozlowski , Alim Akhtar , Andi Shyti Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/11] i2c: s3c2410: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:48 +0800 Message-Id: <20230710063351.17490-9-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: f6827966-e49e-4221-6b83-08db810fb1d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +FBjCoiP14hCSPJsyP63vC3BUs258jb4+usWZ/hMkQ0gvu6csK2YETo+wahMgGEUxRqvgXs9L6ff+yCrTzKFHXdWDJBSR4VqYW1sD4wML0E1RspGmWBme+dyhKSWl4G9fRvSCq7CN2qZxxpeBlDZgmxvdfYVGY4rEqCxCSWDXAVlsPF3QhC/EBiD0KkPnjboHE3WbtOQuaJ6jaKAMZ/du2qdhQOYx7GE5i03Wsz4iUBhLgMPF40K43Z+tojgfeZ7Wa1rP8g/UW6I5f6lVN0QPkgQ1OlRNMafaLMUsLvcwYqyls4p/WFm9ALK9KBU5mGpTXCUF94t0vYOWWDdxMMAuM8X/9nLFfLvuEmqLLW/oaBGrEQFD1S1M1txb37asQ6+Yj2DVNQPXZwy/HZoN0fWHQkydP5i7X1dW42ruDMzopcLRmgDoNY1OwE9f0LX644NeTBANnTAhD4/i9xkg/6KP79r1Vla08szllqsd4UPQRNdDbKG9fdmY+9R4QORbt4dmKVssQ/a4Nixue4KBsibjpn9h614xUq7GjbToOB3yz7b8pvlf/zc9lRy+epNJKL0ygpvVxsOzVLK53xOY3h87vgWQ9f8YYyZGdaqOWgZKlC7ZxxAN3LNF6GarDE6M+JT2yBw/jzBuzvLZssjg1WOlbUGPuWyCOV8LZNiFM2aI0E= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(4744005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: d3qR78BmQLkW6ZLfIgxCggh8A63AsbTvzeYVRVxXSm2rErZk3dSoIyKuEOTwZUzJ0smBQaIOgWnvRFiAm9zPzqPu505JaGt1+h9LOCzsUUM9qgMkSjaa+xvQeRBswzYnJSNUba9VV3tKoQIPKfADd3h92VNYzzu6wvlMAz1jAxtkFc0XmuYxDd1kNIWQIywq8lSO8plT1a/GslOIpWDDnoqqOWP9sHRFiV3JPtua24LrD9cwCeowISwDLC6ALzRkYLRYaivPtCEGXyt36fah6Jk8kl+KZt9CMjSVuT43M/3GcJJqaO8MkkELGG4hx8HqWcv8NPwPTgTkkV3E7+kW7IOpetiTokWyujywmrbg3VxK0EAPT3Aktu3ncbKqu6f23fJCuHGU07SeGxjvL/xexnDP9o0EAAvhX64Raf0ZMkMeVgL0U94M8/vyBFvkpxcj4y4p6gINvFxQWzJmimmYPXkbGUQkANn0H6G2rKWJ+yXIwGKWne2tNlg4UQhJENjLCiqMUz+ZqqWqgXZxFn6WrTwl8hqxRjBn4fPb58r/O/ywKniunTkGofSzAl6L3LpFgQirPfxOfM6K38iRVDvQfNA7l0B8W1PUaNuShsOuWtCLjUuAh+I0O+uOMb6miri5Vrl3XyobaVdyureXEUsnFZStxaAlSukPUNhROblYwY1zYDKuas8RRWOjrgJf7ho4DMKCK5H+7DutAIAzfJE43DMaYZKBlNNLrXvw2SzlihZrj3HGbv3dbqI42uCXWV9F/sAODy2kEf0GvYvqqn87eKQGfflDWEq4VqotJMjX7tcGtYEhGZ2vRJzlqXpVEKLMtSKwqlx+uNMuIi0PlvXoxC2v+IP7wgy/wPD8SDz0nVEv0/9bvchItDlzg15CdeJlKo94W1MgR1AfrPbS42Ec0gREaRotLv18pOikIVkpKhSivyYb1GSvwI8JUZGF9FnAIWmUYsOSbd5JBtkRCy2KbBNQUsn/eMLAT8FiO41OeZq9jLMFPE6uPtV/ng/WZsDTE6liLv2VuRjaCXPL60ZRICB+3QUnSzfw7B03g1CLDmEQQCX2FI6EBPuZgBiPkb6izUuBlKCQuuMLgRrPUdjGrc/1Hzy5So+OdEoCA4RxTkMIOtTwiiRohPHlRZZdBKT6h7mAa88XTiidmaIqXJAe0P8kcZWCarLyU85vnrvzpP2J/7/TMcC+vH4bHFeRTMnFbbiDgbJj20pfEAPYKRTkfjVnuUHK0T9j5SKpJP2Mmq9/b5FH1vzn3LLll1L7OzwFq+kKkHRD3pO3SCrU4lYpOtjt0OG5SM68oADtwrF5x8YH9gz5Q2uT3y+ug6BBWm8LAnM8xWj6whZvhio4hBpTdFH8dwS8QqRNczB3TMNCjxOeZuDaeelSnR4/pOEQRjId0Ko/CsjQ374M4ehQNKr0tLlD39G+qKLsM+IadQy1AuDWgR4e6Z6UDB+4iCJ5Wohm+wMZ7ve/pItBnnMpWWipzM1/L5RMb/lzvCBPlwQGqvAAn+PVP42P8UkxzpE7Qhk9msz9qhwYK5W16Tf8eYNYfTcelW6tdeuTCaOoI6shXpGsKmY3GVr7wDUBTpS40/AA X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6827966-e49e-4221-6b83-08db810fb1d4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:21.3142 (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: 3fnGRPtnG2vjTMRO9KKD07C7qfST96h1KAIU0U4pT9l6ycjAyX7jAhILdJ5AHf+ShBs6I5r7xrtXVlmGCaS03g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-s3c2410.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 28f0e5c64f32..c14c3807e135 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1034,9 +1034,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk); /* map the registers */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->regs = devm_ioremap_resource(&pdev->dev, res); - + i2c->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c->regs)) return PTR_ERR(i2c->regs); From patchwork Mon Jul 10 06:33:49 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: 702083 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 1EB14EB64D9 for ; Mon, 10 Jul 2023 06:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbjGJGfo (ORCPT ); Mon, 10 Jul 2023 02:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbjGJGfQ (ORCPT ); Mon, 10 Jul 2023 02:35:16 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D3E1A7; Sun, 9 Jul 2023 23:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QaUQsh5qDFOTfEx6db8ANOYQkFyyysSLy6cYC92i6sfKVFa1/JUL7Li0b6oFS0VTuYtRMZL+DMu1/8OwWlaJG10Bo9OLB2tI811S0m+HHbmbTY+SPDplQ59/My+bbjXvnjlVxs+SP5KUKJ6fSt9R825z6grxDdyG9w+feR6CohtgXpQhmUCVuuyUehYBf/WA41ZxA86MmLDBdwNci7FlZF4t8G1O2PoDio56D9uu2nTGbm+7IUGbZc6hqgZzCLC6VjiRmB3vrzgcSesNPd2KbbpNxivlEqtuy8HpetXvg+o2ZaOcejc84aedGNGuWCNogcAljuoa+wQqVfAhw4Eefg== 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=TH2zgzreA0+1DLz3CyJ/QJfaeMbLJAdZzM+utAmlUvQ=; b=VCmJUHEmTor6uadsfRY8hBNamiyCrLgeiSQw+7s1DL5s//K+tqJ2k4OrKXCGdWTgRRlWD1DSTxMjXlhfhOgq+8Bl0YKAeQJO35mzwxecDrao2cl6hKNhjTW+I9Jsa74jdIaKLTVqGutzPETVHGdVDBM83RUQ8u9VjPjyI1GepZckRIp8yRdHojX/c73mSWu5GxQwFN9Ly8mqmz51WEauuPe+6hncFmGwJ1zUy5hINA/p+/N2TQwGgpjT28yIuuLjYzsJaqBAoVgy7XcLP8Dd3UwbpKkBkuwzVALf9HlYFmfm7aGfjp58fPPYsqd/M9ysc1f9xlU4JVYx4XJap1O2Hw== 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=TH2zgzreA0+1DLz3CyJ/QJfaeMbLJAdZzM+utAmlUvQ=; b=UO+xLrNbHBt95/TzL3zFGbrgWZRCgSN5zRtD8YligEzY2Zxy4ieNHoJ2SWjD0oP752fRww+ogqdumB34sAp31jBAmDcK7/5fQ+RirfOXfceIDvr/hvidjFLSM5ZTtnxp61z6FPPmqm7El60KgFwmBstrxcSuSYVP/LSWpEtHA2wKyW+swULmYNL3qCWT/5B9QCVgeZ0buUgGZbm3X/UbVpeJC28RgUi5LMZnvePKd2HZqdpKkj6S2Y09/U1PV06LYqnyOsi4N8GtFbB8mrasCfad1E7N0s63lk+yKpc4VFXwh0L1LP4vvWMCP32wg0YxkeHweirRlkGMp2tJ2K+u6g== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:23 +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.6565.028; Mon, 10 Jul 2023 06:34:23 +0000 From: Yangtao Li To: Andi Shyti Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/11] i2c: pxa: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:49 +0800 Message-Id: <20230710063351.17490-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: e1fd90ad-2c68-41bb-77d1-08db810fb2f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eLtBHtbVNmhAlwxsjm5LuLNggWJnNy6yDeTPxeNtHUrpcgTiNXbyBfyepnykVRWRsxFpPOA3oTOQsbc/gVSYO9g0c3GQ18M54n7c9bXkT68qnINJu5CTF/MIqiBcE7Cx53tj0QnwlqF4Q+yulnmrEgaG+ky3VFyyqo3Dq/EhwNoUlMLOiBJYI18i3nc5AACGMmBMNmHM+9ghVgQy8BZMznS56FekiYdNAGrYd9EdRtyn6sDBIov6st3RvpT9piZVLbzGbV69xCkDNgi72yMf+5m210M0RcW4iW+5R+vp/H3y4fgcqeyN8w1PTfVDpWwVyOaS4KNA1Xv0zXybiLhAguX01FvFoaoJsyCSGgVp6Cyy7zQD7tUYGKFL0hTz+23drlXMza5q67ShQfTQbccizEe+MdzkV5UFmqtnJPJzvg1phrAcDG3ZdbGDBtUPKHVq2zAVjAeRg+cUcAuxWQ1WzA/836XwsCmHCN0ng33JNB0Yt8uWY3hwtopiLFCgWdBQPoT54RJ+bOOtMunj2wBwhuM1fNNjT8ejntzuzQtCvzxVduNd3oznN3QtaGx2NOjIuvuFoKJN8rYyWb213VQIL5+FnbZ3sCF72NrTTwuvox0fTGAc+0x9SCuZ8ukyLXvdBnArOUuK73GRiyjrsw59fFCQRdKJRB9znRdLC+6AhNg= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(83380400001)(36756003)(86362001)(2616005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(6916009)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yJVplNEK0cOxFegAPZ0aeq87TQVOA7IvpiGngqVPVuzrHgQxFg4SX1i1byHA6auIsrdiE0IZSuDHYmbmXpCyBtQ7k8FkgPnhVSnnloDRj/QizySjQkP8d4X0HPqyLQvxC66lJ/Fz4lxJIytUntY4MxsD5wlJQNvQ3A1Msx7KIv6sbCTKVkhQvPJHC9xTwBNd7IBWjLGzXTInApPPLmXL3y/u11Mix9FlLG/sTCepevVdwYrOrRP/zZYSzwVOK+vnFhlSHVLtQS7T+/Ctg8Z8OfzdHXatVNPwvjZ9S5IJeCgngGL0ONZnHERDIu3C8VHsdcEhrxfaQL74d3LWz14iyHP6l6hVkZTjnVfwj2TgjYR7tohmgMTM/xhb3cTEI7L7haT7bkoz5UsgeDFrkIjd0Xg2/Bp37ZnJABpGiGkoXAI5wTkC8AkHqo3G29BknXUhGqbRS9d+b1izFx+nS3lY7mO6DV+D4ZlV+o8BjgdfmQqxZfXhyJObXBanZKnj9K475nX0qkQR2qT5DxfwkTzs+oOjsjcWGJMZJvU7vXVW8708eUd9lS31sB0+jFfDYHbrgjBQVJhGzaTx8fudsRL4jnTV/hf2lImD8r0NCV0IAYmFU8KplnyiuoyN+llUr5qEsWdGGR80D+W+NZwrbbzq8utzLlcEz3XitWUb05Fo+KeVxqgA0JdXBXJJba+f0ya17a51zpievjPz16XPJdsZ5j3dIQYP8xRdJ9/AOB9ao4vQlJada5QHXTn+hd2tjlkBdlT3b5/vMWZmCPsfWGGdX1VfP1P5CL7AghmcjudRIB3SFqnTIT3KvEprl9DMXXbskPxbc0IhKECJbyrOs/ACNLlutyipCU9Tnc3rst9LGDaSv5XsGekTHTQvtmz3+eTc7geYpg0vomwsdIdCPoLk4umHj1Frw73aGuAElIXM9POberwtpFAUe5+WEWu50K8raQ7MZXBFvZqsGi4rxTNc/TUSm3irT4YRdPIy8qTWIq8Dk4ibn77bjtHAz9eBUZeCWAnb2hOneUWYQX+Ll4b3sqcPKUAavy94ywLBy7TpPxG0dMS7xqDOu8dsH0lTtSNcraDJ5EWXrOErKfjrVLyEG2W7N9qE1t0ESBj1dIm+o9DvWpnPmwSwL7H9lSLZNlqRy0syaQLHSiMZmCaQ7qafGaPiGb+4VQZ6CVixLg37jrUHyNNjD4/PSi/F0hQUjpXGS1ihvSX2yyMfKzv529FJ4ImVJPIZ8OvAPNLvjBRkMpTTMYDgY8+vidp9hr2i5HIyFGKH3hvQu1I34Z1uuZGDm3bcTbKoGBNhFbXhkbzTSvzA96jKs1gWYT0hF6g38VL09uf3PDKC+tN2k2vhNQwHIPp5puK6hAoHOfmstw2wd1opIPkcDkdeEsdCnqEoNVwMvwahAZPVtAkiPevh2BpGEYYSP9PCGoSnKBWkX9dCLANkYDpobyI4eSLMXLak43w8vI/R/BlTekREXY9jLcwSfBkSqDBXzT2dg1+e+BSsXFr1Srxk0FCdYaqwMR7vidy38tg956f8sfU7TS3ZYIb7nfhkBrEvqz3LISnTLR/G6m8bVM1csQXLthvE2njll/ww X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1fd90ad-2c68-41bb-77d1-08db810fb2f2 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:23.1972 (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: LoibAWyUJ6jlBh9wyEuMm967CThmpsUjYDjxT5ceAf1WVSfcBk8OxcCPkz5KPtUR8IBKT8/iPWyxGm02qtIS3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- v2: -s/devm_platform_get_and_ioremap_resource(pdev/devm_platform_get_and_ioremap_resource(dev drivers/i2c/busses/i2c-pxa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 937f7eebe906..b630bfeaeb85 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1362,7 +1362,7 @@ static int i2c_pxa_probe(struct platform_device *dev) struct i2c_pxa_platform_data *plat = dev_get_platdata(&dev->dev); enum pxa_i2c_types i2c_type; struct pxa_i2c *i2c; - struct resource *res = NULL; + struct resource *res; int ret, irq; i2c = devm_kzalloc(&dev->dev, sizeof(struct pxa_i2c), GFP_KERNEL); @@ -1379,8 +1379,7 @@ static int i2c_pxa_probe(struct platform_device *dev) i2c->adap.dev.of_node = dev->dev.of_node; #endif - res = platform_get_resource(dev, IORESOURCE_MEM, 0); - i2c->reg_base = devm_ioremap_resource(&dev->dev, res); + i2c->reg_base = devm_platform_get_and_ioremap_resource(dev, 0, &res); if (IS_ERR(i2c->reg_base)) return PTR_ERR(i2c->reg_base); From patchwork Mon Jul 10 06:33:50 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: 701359 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 44472EB64D9 for ; Mon, 10 Jul 2023 06:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbjGJGgJ (ORCPT ); Mon, 10 Jul 2023 02:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbjGJGfs (ORCPT ); Mon, 10 Jul 2023 02:35:48 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2121.outbound.protection.outlook.com [40.107.117.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84DECE7E; Sun, 9 Jul 2023 23:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XN0hxWgTuMg1ofTlw7dvVUD8Ku3s0dTW2Qd1UfATZNy+fyrvnNv7XH8nPYMsw5ZDypumC3bUzg0Z4gUKjVPFzaoltH8wrauu4Qr1Z4LiCIt4YF+Vm5Tmj9ROVoCklPsJ2mld0NRtTHtFx7pEd4n8ci0q6jCOqM45TKfPRMLtTzd5GwsegD0qPwZ3gUKa+QonXDf5ikd2NoDRmG5Ovid2odphqc48q/gQRZ1bSfAtayMWoHvgk3lCWgl+8ILONDvU3cWlzIPPTvGjg3cp8OnlBXiihwMQua1q939mBURC0+rwjRW94Y3vUTJAoKK7yatLo4D+Q0cjglSX91n/+AwoHQ== 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=V9V3E/S7EZrZHFawnqtiHHPJ3MITcasZo4yoCNxbo2Y=; b=R+XSIIwISF8rxQBDDudoYYOJokscpTiRw2QCKW/bD8Fki6qrBEYs77dOQd+6r9TkL5y3uzEeSOHSOnNzzuIVBqloKXRBtwsc3sFs5Uj6WPXuf6BVoul6ku4/LOkg6rThlarE55zFzSgnrf9iu9xE4wccilx04fWJ4W3NQxnbOaN2tZutEqD5q4Dju9D5pY3KUZ8A0lMBa/lKQBQZpF0gYkzaGeBkWkkHRbhISu1iVJRXOOl9zgELEmdrxYe9m3AgVNqwCQyAdP+lItLmkreUalvmcbVw3It/ND8BBQ712chzB4Gwk9vg8YjZ/d7lKyNAqB+JSGZKg/MPpr2tcMVJSQ== 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=V9V3E/S7EZrZHFawnqtiHHPJ3MITcasZo4yoCNxbo2Y=; b=SGZNAGDBtT9EfOlfGtmI/BadRhjtUPy4okRRGo7h1IaZXj2KG4uGLvNHRJyNOFekBAfXxaDoZE5UNArtBhBGU7SXOlhLKz/7d6JKfwuJDzku6catb2eggVMFGIerI8F2EO6gHceWuMQNthKQn+9DZojRGvAIShh0kh/tLB+wEcKrKiZLKd7bDPj9yAudfDzrtj2r78U2w5W5rCLIEjzxT28nR2j7fXDBiuBJYoaZQu5Y/wVNxmeCdl9SpFWR9qHurDa6rgElOiUFMeYWbJSP6yF7SjX4QruB9VoI6yDqH9WUsfUFSRqGey1smTW6ow5Wyc4RbW9IpG/msnYyLSKlrA== 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 SEYPR06MB6586.apcprd06.prod.outlook.com (2603:1096:101:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 06:34:25 +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.6565.028; Mon, 10 Jul 2023 06:34:25 +0000 From: Yangtao Li To: Vladimir Zapolskiy , Andi Shyti Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 11/11] i2c: pnx: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:50 +0800 Message-Id: <20230710063351.17490-11-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710063351.17490-1-frank.li@vivo.com> References: <20230710063351.17490-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0021.apcprd02.prod.outlook.com (2603:1096:4:1f4::14) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: 93e526d7-fde4-4ced-aaee-08db810fb417 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c4axZ3vPtkqiOf0Qj4SP5S6hviK8yv50Q4ZVxWpn7JL/KJ2b9RKeeja56OXMq0DPHr+kKMVo51UtyOBcOdWNfiOtwreI/M6N6tSpXWQDV+VvY9eVkTz0hkebPwmp47UVvfT7C0jJ6KyJV0AKdKdIFycC/ZahtmwihlX5mFXW+UF+WSh7dSGBEcj74XuB8fzUGEoI7NlJOQSxpjQckUOzbfmLvg1DBHXBa+c8nKdby/8FhfV94M0tD8reeNA06iqxfjSGe6KI8bNZrTsAIu6dkFRwNefynDdaLa1STFHMvCsq/+6UMiASeJGI9nQcTdbzc3+zHGixCt4eWgMC74F8k4j9wrA8gc0LaePwBdjMdd/9ZyZwNaxpLQrqP2mhNLwyR3GpcHzbPr/0I7XxlreNf4Mx6xCj5qEihXRMwdmVcP0Bry5XkjM5U6ELxDq2yxV0db/363rObWd/kjZ2at3Kd48qvQMHiY/eXrfLOwkLvsLVPwj0G5+oezKOYFCpzq5HfocEZ5p2EE3h405tnNpGI83Me6QXdTdG2+efTWSQ6FA9HS/KWCSZfmw/gJDLIcw3uSTVRrI5GRSkfWZszSsgRWDvaO2djmooSlTXVxS3G9KocPj1dbzvkTD6uvI+uU3ZKrDCazI6JBBLj8IxFetx8z70lBZFiRjxlTo7zQqkteI= 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)(376002)(346002)(396003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(83380400001)(36756003)(86362001)(2616005)(4744005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OmqsTi7XGp86dnhznAIJ2OTeog0vS6AtoC24O16HENTdsv4Z/SurZc+i7zTZ6cCYr4fB1NZtqH3zBEeUTWueEqB2KJzTVQJXgz1da7QM5pmgoGQUGdQxaQiUq5Sj8KHUpYS8Zft8V420O4hzOXRnAkqDCT3MyPWka6WJ/VSdEZ36GOs2xzZIxeSKO1AVGYuW6yc+kcQw6tZdBUGw7ANqbBplpv1y7l9dwVY2OAocVTsOeIG7MCFebPzfH+VXOINVm+tK578EKO8wOSpGsgugvl8GSDRtoN0pPdsN0Q5xkwr/dHi4ekEDdFW74P7vZPIg1Ccp9tFxGzC8UzgcXzXjAFQ1MB0i0LmO8rR7xQ2iHkfD7I2PXvJXaA0YCuGV5Gf3gg/j2bzGmdvFzjRoOrZNBJk93KXOcdic4FmQQLlC9XljPWaRf+TELO4fn+FK5x2MLsqHGep1yvlmRMh5FOFJRLmbg3rQE6PS/BO9zX3IGqK/jkLWHX0A/sZUyYbdOvMsNTjzxzynT6U+rx4XxXEnbZedLbyZB+kXCX+URuVDPMMpttgsj4W3WtvU7dQuvFXjW8fzLNvUREddV0JcGWAhfL0VkHrjykHrodBfdyKuoYG2WN/fIGgj4CQgrfazq6VRiSKgpcvcSiEjUYQW6JlI1z7rYrrU6PR7rH92465t7I0cnBzux4HpNFOUQrLk2KK+RqcqE8ZF9+JWj2kDSYYCgnH2CWBcyX4df42REX6uXf74TJS9KpvlM8kAjJNkd821boeODiRI9hGJmKpaIxpzSHoxajGoeg9lf7Ecec3EnNsg9EDZ6VdNvTz18/enU1M3rbWAS+8oHYoI7DJUSwncxO6TRNI5BGMMZd2Ch+fdiSzgntr3mUPgRBCeYOG0juGCoHS8uQKhyfUPfNELqiKgXXMINTfhhEmN6D0aaLI7lN5qtXTHw74RV18LSOqIgVgwX5PJB+uUsoLUh8pKvuU97m6UbVMDz9WksdEs3CAgzAYL6zQ85TzMSJpMi3DJvlrkEKKdG5hfbOYEyiDgx4lJUo+XZCROEmWWpKPNFYvEsvX+OKBc7FhClXLTar0KIHZaI0OyE3lxJ4FtM6+5GKIYnTa81NH5i6y3UfVHzsle29GSNJKz8BORicDKbDyzh8++Ppl7MPrQhyPNghhnFo5ZMUFnURM5aay+vIw8NOFHPJ2asng1orlG75DV5XjY/l5KPzvHVsR734KFiRZ0hd2H1FCGbkCpEcXQZkP4ER1S/x3VCsx4rDflgrJGNTUG2ECZoFRB+hHcjSpHdlSFsAPHicQFg0FFWFnX4xv/l+yiAEEpT0DAHJGD+RZYWMfmbpUWI8NnDT3Rb0Zm+40CQcwQuhtc9wJFSQdzqv8yGXUWxXSAyoF+wOyBZbC4TDGjQ3mz3KBcE7rbj3VjG6UcINSo+Tk1wUJOcTBT1w+BWmVaYpL/eVXxNP37v9qyY/83G2pe2GNzo2dAAKgsJrxXcn6lW9mjgYm+Lgo9KKlgA05DPNOhNTMxU2d1SARLtWSYTCvf3P4w55tDqaDdSN1RRUS04ZRlCKCtx/+hSYCLw91TSkZZywLOz7VTck8I7rrANgRg X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93e526d7-fde4-4ced-aaee-08db810fb417 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 06:34:25.1048 (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: MoRNNU+a9JMERgpBX0vn9wrJ8TgrkpMPW7u+Gu/ZP/LHxONrz49/B/vBdwjw6SmTL2Pe1aCdYMIbS+wd3Yq6aQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6586 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-pnx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index 82400057f810..ecbbb60407c3 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c @@ -683,8 +683,7 @@ static int i2c_pnx_probe(struct platform_device *pdev) "%s", pdev->name); /* Register I/O resource */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - alg_data->ioaddr = devm_ioremap_resource(&pdev->dev, res); + alg_data->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(alg_data->ioaddr)) return PTR_ERR(alg_data->ioaddr);