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: 117642 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4825886vqx; Sun, 9 Jul 2023 23:46:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlHX8wWQCJfD9KwJvFduiXTOqJevDjNfO7D42AkhalOZEfSrmkE2slNWuK0WOm5U8uduaJY7 X-Received: by 2002:a05:6808:1290:b0:3a3:f3b5:a74 with SMTP id a16-20020a056808129000b003a3f3b50a74mr6693975oiw.58.1688971602054; Sun, 09 Jul 2023 23:46:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688971602; cv=pass; d=google.com; s=arc-20160816; b=ZSaOsUYDW3PnA3+uq9sUbQDlHWR9jLRC0fPqZEZ8YwvA3DQEMUu1D5SkGvIRKPJLRV W4z1nRXSVA+z8f5cLAQZDV9KolLCrIwT+j5Og/WMhrzJIo8THLts3jie0mC92IMfIPUW hyWJXghcpKhAQlrd+gHnd/qv3chsmhAwpEX4hx1Mynw9V8YJURA1qzfk6Q9lEXt1ppiV sNE3mIpittP3Z3a6rJCYTS7hs4WEmo4vPIXaYVjC0hTSLG56CTHM4jqMlqOpTRqGGYPD CZ6jXtZfZrQ+32Cp6Fjw2OwawTN69NglHmLMPIJpXZDMYfmbjBlVe49Mt3hSSRDPOxlh /fRw== 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=V9V3E/S7EZrZHFawnqtiHHPJ3MITcasZo4yoCNxbo2Y=; fh=Xb4NNNQ5jPda8+r3xMnfvy0DaqXbHg593SCtOY6w3Uw=; b=Lcy3A/62gpJz/3JyUL1mtvo2yKgS17u39zy5T+EmkgVvQKOg/1k+L78l//olWqt/VR 0L+nvdO5bzO4Vn6l4VNfaHJ+c0/k+SrkAXynSlmC88TsP1UZ/EbyHp4P+ZA8de68oCk/ K3XzHftscyuy6oP98as/yZdK5k1HsvVOQSJPjmVblwANs/yC75rRNuaYDTPnjZS1fvlS VAwJFp1VMeNqXQb46hRpWQyuJlJy5g4EsGt/D3ylgge1ig5TCYdQKEktVx4vLFM5/KVF XlwcLt/sM1yuhm6cauxMnSXfP8BcSik8GfyYtmrl42uJ6Ywup+7gwAdmm4S2ie29I3GB KjSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=SGZNAGDB; 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 e19-20020a656793000000b0055b0c18704dsi8640952pgr.652.2023.07.09.23.46.29; Sun, 09 Jul 2023 23:46:42 -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=SGZNAGDB; 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 S231278AbjGJGgL (ORCPT + 99 others); Mon, 10 Jul 2023 02:36:11 -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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37v9qyY/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 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: 1771015086483555151 X-GMAIL-MSGID: 1771015086483555151 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);