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: 117641 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4824874vqx; Sun, 9 Jul 2023 23:44:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlHq3Oti/7Ns96w5tTCg5ljN4Ku0dRMqtriF3i1q1gz0wNswbCDg+omCXbNnH4k97JjAmfwm X-Received: by 2002:a17:90b:1d01:b0:263:f748:21c3 with SMTP id on1-20020a17090b1d0100b00263f74821c3mr12588929pjb.36.1688971456416; Sun, 09 Jul 2023 23:44:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688971456; cv=pass; d=google.com; s=arc-20160816; b=Phiv5ciYtI/Cx13oIjqiS1Nvrt3ybSKaqeoDvSWCcK3PodszXFIufK2FfMgiEslYlh gb/XsDro8dUICIl8RRGtxj6QEuFtuIDL2PAsJBdRncgokpnGvYpBcLcYmArcmHQRUYq2 PvH/Pdp+HEh5V9uuj+0O1e2DfN7FlSF1j5chxHApEP1UxMl29RW3GSkLInw1ilMsgTUG pp+3juici+KGhCF++f3OpqZo6IrQPQ5ouMXEIUfDys6hqJvIbs7RnKt1UXTTzQzrRmmK d4eLkpLQUfMmK/pvDlaZHgFYnfZJ+9jYNkMLPGst3oGSQHjb5UhCs3E/atNPa9PsDbzK IJeg== 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=x5QqR8o8uukMvzlptgSjHcr2iKF5BjsHm2i+3S7wLhE=; b=exIVZrLaInFODP0fahZ6hUEZrxdPoIQYSx3aLZYYc0DjVTmaca3hTFej/s2jAUbp6P 8L9FRz7Og6RBkFclZ+ptpIOVjg9Gez+t8cWNtb7qXb6LVLFqaOMDwoMDWbuGr449lhQn sjLwChhpFWv41cCsSB+qm0VkLY4YfC6aXhk6BQqWNbunjbyCLjmVkaJ3RmMsd5qOhwzy lB6Lwv+kzWVDfdqgk6anUyuPzBCzvjXoC0Gzhv2i/2it2Bruu5xoxGhSZW93CjW+GlGQ oJmlRAfUxNLyuHE7cEUcmaAuklQ0+pyjKhS60OsOrv3DbmeWVzvwJVffTk7qNZ8cGCXu aJaA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=GVST9e7Z; 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 x15-20020a17090a1f8f00b0026395ce41e2si6730784pja.37.2023.07.09.23.44.03; Sun, 09 Jul 2023 23:44:16 -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=GVST9e7Z; 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 S229736AbjGJGew (ORCPT + 99 others); Mon, 10 Jul 2023 02:34:52 -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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8DpE11mKL/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 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_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771014933503883949 X-GMAIL-MSGID: 1771014933503883949 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);