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: 116164 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1900039vqx; Wed, 5 Jul 2023 07:14:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHnLm+5aF1MG4VNBXTZBVDiGI6fmADkM2I09ubVNwBIT3bnEjMk/uvIOQhCMzeWj2ofn6IX X-Received: by 2002:a17:902:dad1:b0:1b8:7fd7:e022 with SMTP id q17-20020a170902dad100b001b87fd7e022mr11263396plx.28.1688566495037; Wed, 05 Jul 2023 07:14:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688566495; cv=pass; d=google.com; s=arc-20160816; b=xP8Rlf6Tkes1cyM5Dvq+HBFGhy0wFSucKwJAMXsGXa2uW37YI9JV+yoLUFgcCR+3D3 jk38L62zcQwI1iGowSmSImxiQZ9fEMMjz6T9jC3eF5E0bGWgH2f6z+BiPeX0Un09011P 93VTRZVJgDWw6JRGfIbQlYRPkyZ9ljd7Pm+gAJMyUpyVax1rtNd/MctLWHNyq2iGsP/m 2wQfmuXDS1hK8I8H3ZySjzvLdIYLr7ChWlBwUsGUbawz+wuFPhlmVHkdgvNoxHPLhT7U wHkLYU8ipZ9Xnj1VLtp1gAQnggi4nvaPg3qx1dSGRNIsKcypA9gyoTtkKAUnOkm/9HBS 53HQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+f1vLbTi9fKLjup7MkbKDY5dDT1cFKNHL28OvmqBpRc=; fh=ir53gviSlI4sLWnw4QQg0H5I8oByuzTzqXLQgzZrqi0=; b=FFtrs4RMuaehaea9Gq4l4uRn4CJBHgiQsYgRZUSePPnBHD80GrtRd5NHuFhxCDOaDK tM0Vs1PS7vCwxnO3gfAUSz1RBHI9dSNdDRjZHQdWgo4kJcS+4h0rkgUqHs/w1grk/47C +sWjB0iVuWBMULq4L9+qcAOaAsk/FLhzMCYflSgZ2NRKmjdCc/uu0lYfAhWyS+1hhDjQ IXZPEyuHxLUwl6DQfRt4OgFfcBwNPzwZ18XhDDnEImiNByfEVA7H0JK34+TtjcTSmD0h lv+ow+LAHhqNNCbgCNJ81Lz5hldDVlltdiAOPk7elIFJjlaWiDOw29jFZjl08TLVqbuy qPwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mUDBYTKB; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903024700b001b54ff18ed1si25217368plh.267.2023.07.05.07.14.38; Wed, 05 Jul 2023 07:14:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mUDBYTKB; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231162AbjGENw1 (ORCPT + 99 others); Wed, 5 Jul 2023 09:52:27 -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+xb79LWoIpDPUxZmIYf8fyjnFXdMYnXEN0K0sND61SOA5r1TKCkWlXDIDH3vdReMdhfW2+//pmOIb612EPgahvBk9Ej+lDcnhQFa1bMOkF04VbXCQFFqGNJMmV8LuM727L1VsiJyfrJs0IRJICovwMzt0klMK6RQkTObXOzxGEVegoWzsukz03W0I+uwBwZBCotGvGIbmQHJiXuYucLRUW2Rk+RerV2jWlHXKWnD1bZUUxYrNNE7MWLS+hd2Iq3F1mvYyQOizzEDVsmAy4BQG7+RVDK7ZD8FHa/UU8USME/fGhlEk9hTEYEuk1AtPQ6DBAzWl2OSOMOr+Vu/bHc1BpbHZP3v7Uh016YutiXh9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u03f+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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770590300982190273?= X-GMAIL-MSGID: =?utf-8?q?1770590300982190273?= 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);