Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34950340rwd; Sun, 9 Jul 2023 23:53:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlGlDeFKC8HhBlxFWcRPz/+DQ1KhZ0XmwUwgOeHAUg6mKvcLGMsMXCPDi82bb5Qc0XlptZgu X-Received: by 2002:a2e:9058:0:b0:2b6:99a3:c256 with SMTP id n24-20020a2e9058000000b002b699a3c256mr9398120ljg.38.1688971979794; Sun, 09 Jul 2023 23:52:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688971979; cv=pass; d=google.com; s=arc-20160816; b=YqrCUtoDJwURjthhoAdkX9gHTwD39EyaYyfqARLvIp9xBjEGMPr40DccGgJ6HdOEvP ntVtiXJACQerwT3tGzhKEdyC68uBgDA7oPDQY9VGEPwkrlMQOZb04TZqupUbspNfGQud Qk8XESdW3cHuP2SYPuA+ZVewSU9TdBBGhoD5j8c1Rn3bHo6fpG3ePOZ9C19lnmq15hwO 7OkxnOHH0NhRFeCuzyG/d81y5XjUBYlEv1/TXup39ve7mGso03yciENHIvdvV2NENosR JjfXZtPB/9BYHYmjLt0EWlcwGCEeRFzv6iuR9kB4QEDz7JjyLvMWls9/lg6KGY5NDcJM wR1Q== 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=hN73gP+t6EMRGrVL35P8x/pQjqmbtVPaQJg1ASEgUUU=; fh=ehZYK9/QSY/npyA+7zdnP721bYiL5WWNk00IwkUFf80=; b=WEGEZg9+P9YsnG+ZZm7HuVBxNs55jntpNrJenLdUBrV7lacjqMDnFOV64+XrRf0IOi H8nMb6kZ5LTguVVH5K2i1bDVulbrAxBWcgdu+fO2hUHEe125nqoIsBzuBtJiM4Zw7+sN aUkWdIJqfdKuEF53N0LrXOvJSm+FtGf/JbaPzCWr5AawGUBjhg/yiJzFDX9aTtsD0XEN zxuN2yNolsvQzgjNtJ7LHQf23VM7oVl1m2UvSM6KDVTsOopnV4MBVIt03GA8hMPl/uLp oj/MuOLn4GhVXXNmchyH1u/Zc1L4f7UZs1yUlAeUD7dbxHsq0kk8g3dipXVyioJFlsUQ LmiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fCqjq38Y; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs23-20020a170906f19700b00988dd4c5e2asi8190892ejb.404.2023.07.09.23.52.35; Sun, 09 Jul 2023 23:52:59 -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=fCqjq38Y; 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 S231209AbjGJGeX (ORCPT + 99 others); Mon, 10 Jul 2023 02:34:23 -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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?jzNz9PBWuiMiWznAWeXQV82fr/weF1T9oINowbiAZ0nE1TbHLwU9Ap8ihWfy?= =?us-ascii?Q?J08+wxz2R8Y3l4f6AUunNOE5D6VHbZcLeXJ5rBTZ1fWs8y2k1r79+5/G1xaU?= =?us-ascii?Q?tnIi9s/WrvBKkLgKLS6sR6EQIoiA0vkzJO4xsBgix+YaO/E9KME3s5H602AY?= =?us-ascii?Q?bBreA37KYH4daxEOdXxZ6HOI+jMvbI5Vt52sJPSsRv4dWHAaGYi2VYCvMI+g?= =?us-ascii?Q?7MBx7YjgqsoJtHaPCq3Oz0JRhDTxuVYWC1Jy09yMD8XVN+j0hxo3q61IGcid?= =?us-ascii?Q?lP8d4mrxW0IfWio3mORjbMIp52cMtT2mDGjzlkYZg2/BKICwBfWnfmFBTXyQ?= =?us-ascii?Q?pZf/5uLPd6NAalWHBSTYn+Osj5oCmZvCb06yEAadg4L5+r0zxNXJiq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SH4Jaxt7XuCydr2UJUKeyfA7YhM6gesbZNV4gUlQTf6X?= =?us-ascii?Q?J1+k8BlyZjRxfPx8GRtI1ZoQP04wvb8Qurpah3AOdrg6ka3aWbJd83dI0aVu?= =?us-ascii?Q?WA+/1ig1nLE2fr1Y2vjfm53tJYuSLP/0l89AJAwuH+C0+3wLn9x4BrUwjqYU?= =?us-ascii?Q?F+hMDIRHcuNKvuwlwHArH1ziHkvsIXvX9B1KEXE65PcPs7JtF8VMyI+QAv2V?= =?us-ascii?Q?9jphVMobYzWfGoSBBIC74TXfgpPl2g6MZtKSDqfPv2MwUPdjTXm3q8si3s+F?= =?us-ascii?Q?C0hl+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 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Ray Jui --- 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); -- 2.39.0