From patchwork Wed Jul 5 13:51:52 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: 699380 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 1F917C001B0 for ; Wed, 5 Jul 2023 13:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230488AbjGENwU (ORCPT ); Wed, 5 Jul 2023 09:52:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjGENwS (ORCPT ); Wed, 5 Jul 2023 09:52:18 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2118.outbound.protection.outlook.com [40.107.215.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84730FC; Wed, 5 Jul 2023 06:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=No0MNdypCbYdZDhBKyPba7PHE1nqr0ybKcncQQasjcU+GTyGYX5QxfqR95R//C6uVO4sjJQkITBgwVEtvYlqlT0bYO30grNIbtNDJIpiXTN4gtp23zePWoThB+F3VcX9JS9HPwRCTiKSDKtj0S1QfA8HzIDlysj1uANx32lQ6ywsGnws+CEMSAjCcW0bn9nLIof/4VkbOOdnlr6k54jamcYUZhGteRjH1588EQ74Vn4DnqLCs28Hu1Ysx31xrX4Le7AcsOEgBSn6Jh0dsory1erYML6DWbVvd+Wnqh/etNjIuniUeANNRLW7SNcHC7/sI82b2zRGXzlArWP8pHApNQ== 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=Sg+GD3NRPZJGKMWu2s2rIaAeGjq9ooIbXWPEcmaGwWLfYEZi9RLOr9N5eJjJV4AdN2i6XZJGUnF9ayI5F+EI6uQ48mgrMc9UEpI16vPlkrRL0oCboPCWcdUbYEjhH5zjEJvr3cWiI5Xh2V5rQx8Vy/8yW+kvwSAAPeHCBsPFP5YKaELtVsMO9QyrpIBi3gfNtiJF8IcfwAkTSE3mWzKLTFWSh6A6u698Es6fhQSLBYFYlS7u7A1LnwwhojvavrrZJOBik/U8GsWQN3B0o/Y7U6nwij/+5P8db4DGkTqGxvwav40YzIYC3sv8qpJJtO7yqqyHDDmZorQDNRMbXzi1Dw== 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=mUDBYTKBid8J+oKn8FC22ftwXa5TD71ZKKHzfHzScg4H3wByUZIKKGx9N6OssSo3lhmDfdWZInHiDPX3HmAnXcelg3n9mK75eV4vmoaCRWZFz8MtQC9J4vWCt9oOlUisEyWJkDIgKw/wzA0VNc0yPpoZVJdAEyWC+j1n4d1kwEZyDfi8Nc0PvQImQtNKpv7y24+V85kGyZnp+EZMgBILUF2I+as/tJozXOu4iqt7T0c6xYwTtTkQBK0p22gby0lSHgqZNSOelmm4mKRxjnyaRZdQyIP8KJTeSTYf7kmWffGhlWz5U28HStTKDFZpwc8StKkSrNu8rB8wPZsOnfyrow== 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 PSAPR06MB3991.apcprd06.prod.outlook.com (2603:1096:301:38::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 13:52:14 +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.016; Wed, 5 Jul 2023 13:52: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 05/11] i2c: stm32f4: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:52 +0800 Message-Id: <20230705135159.33327-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705135159.33327-1-frank.li@vivo.com> References: <20230705135159.33327-1-frank.li@vivo.com> X-ClientProxiedBy: TYCPR01CA0049.jpnprd01.prod.outlook.com (2603:1096:405:2::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PSAPR06MB3991:EE_ X-MS-Office365-Filtering-Correlation-Id: 955ecc9a-c71b-4083-80a2-08db7d5f097a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VXI03kB42pLOhQS5i47vwq4B7OmnBYLn5kcZeCayerJ8Png8DEzuk/DuxEWHjfZT/ZkqSx1OdcS+5RyVD0XoqK0Ea3uJ65ywh98yW+FfcGKIMCD7jblK2mwztKZsbTT51f7XRgWusIMte5AGwasZ3vX6/SFp1fveTyKQXDT7bj7zshRVS98ELd43OMVmWaizMfttBgywG0uk7dnVOyK12K/lVO9nN95Hk5lrIbAqMJR06csEgAbf4s9+oATruBhp3lr5JX9zYWXTzZ3PO0OQf+S+3ca6hXe/Mv9tV/6gfABVq5p3iVCJQ0Mk/r2helRxinFi8P/gqaNFBnzne3OtWEiNhuu3V9YuHyReYOvip8miIsJAZAX/jFPHmcHABhSlCmrodk526mejPGg3UZMZwKYcJuUsLMedoYr5+rQp2n66W8/kWCUHxYmiCmPNVHCvw6anVTll0nkv54d6gpca/OtdVA9lpfJMLHUzr5Jk07e/72GVp/oB6beuvoDM0l4Q9VR6FBizAzBV2qb0UZnEkEVc6ZcwGOVGjF4YsUohQQFG+H9O+6H3C7t6PR4lKV50Apgtv+VOiFK03Xvlk+jckwQolbUKEkawnqWJZwV2qX55hS73pAc/XvDnilqrD0d9 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)(396003)(366004)(346002)(136003)(376002)(39860400002)(451199021)(38100700002)(38350700002)(66476007)(66556008)(4326008)(66946007)(2616005)(186003)(86362001)(6486002)(52116002)(6666004)(36756003)(6512007)(26005)(6506007)(478600001)(110136005)(1076003)(8936002)(8676002)(4744005)(5660300002)(316002)(2906002)(41300700001)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rr479FB2RqAs/6yVNZtNJMWanO0p0rHBx68xgGoYnrcbGDBCLJ+jpGHx+xb79LWoIpDPUxZmIYf8fyjnFXdMY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W0vqCVY4wsSlqPvdRA/C1lK9FK8nUzGsz0DVhskMpWApE6Nv3CyGjza17ASx6eJx4zzjOj7LKG5WdzV5dmSY+ZEG6tRW8WUITG7/NNPyvY0q39rTTZVb8KPyY+baLZDI6otVeOyhKrNeoX4Rv1AHvXvmoAXowQesE/0YzyBI8HD/3mQgrBoPN1nHBIMDEtxUTW0okU+kon4k819v6xKxPjJS+w5TKNJjpxJ5OW2rO7fgg0Gyg5z4mqEtxKRpiYyp+vejAkzaxXQWAMv/sbEEq+Ky7j8rCSslLqRbJVotWKxNtlZMMbwcqUQOZfgO50TCkcpSpu03f+Ad1D7fM1ri1m3Gtuk0WiKzT+8RVKwxVQMm7E9Jh+qe3umvV5KS7IDQotdTgoCESsIcXUWo/CtUdvkjXOXTR2nbYZh/K6g0QOkDmxn3/2l3pdPG X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 955ecc9a-c71b-4083-80a2-08db7d5f097a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 13:52:13.9046 (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: 71zHGlxt2zWL9e4xWZZw2LDE/Q7CaYoS6DDoFgfP5etWL0ERV9tzuPlz5BTftkxGmSNs43wAJtoI8TGnSzZFNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 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 --- 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);