From patchwork Wed Jul 5 13:51:49 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: 699382 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 ACD94C001B0 for ; Wed, 5 Jul 2023 13:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232360AbjGENwP (ORCPT ); Wed, 5 Jul 2023 09:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232331AbjGENwO (ORCPT ); Wed, 5 Jul 2023 09:52:14 -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 8D79111B; Wed, 5 Jul 2023 06:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EhqH9XC1Q6vNsDKMseDj4DH6Wm+/4bOzZdMONjnC59QAERkyk+afevkyKK3AvRg03uup/AKvgH6nVbHZH2rvpwAVaSS9AAVG1XDKGdbvl6UhZsqVavOolRXU5ldF4xaDZT1hIQn0qSbGQi09fcT2y+Gu5/z82gngFNpnW3+gnDdCNV4miBo6fTwjnq+pCn4gBvA/CwfoVV37XZDZox/1B4oexMOGdKlG4KJZFbHzJDdqxfAw/kEx1im5czYoxwSJeGFxsKfl63PQtRNV/Nay4NnjmImYR9e8eSXsEbNJlTJYqOoOYYMVZoxGQvy+qdqMM5rbKkVRFmyQaNAmmPRDyw== 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=9t6QskThFSp8iFbL7euFZmsipjxCImrO/1Qs+sOCL+c=; b=D498s43dQ4cA9MITqdisMkSr1qngd1NTpfyEKNpbGwBGpD3OHN4XouzDgu27TpPAcFNKbTp+eXT3zGDgUwBW8/M17/8cKvt39JEoXjY80I0+7teekhbqDChlz9AtbbZzIFXC0cEF3j65JK69JnRCwVun1T8Q7/J0S2UEhYjFhQiv0nLCsGiD6locTK0NmyJ3dlflRVMQgZHbNjPn2zHpp3ef6f92QoJrOc7njE1hnlfgNPhn8q7ylmixJVC7MSNwGVJ6IA2qfzdY/0FRDZukPLsysuOk+JlfE8gB6hN31vuAwgnXlkqbnl1SaX7UI/VGPONPNGnVNTNmkf6O1fXa2w== 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=9t6QskThFSp8iFbL7euFZmsipjxCImrO/1Qs+sOCL+c=; b=j0XgzB9dPRCT5RKTVzhSPx9HeZ1C9/mmKdK+nvHoFUZjVOGB1jBgQoHdp2boheJN8NjmxKTQQO19bqzX+zIzYeVQbjwIM2iUo5zCVTcQJbzZHA2XktR8tIHHgw4qJCRbp/L+D7HhlzKN0ZH0EwQcANi1SsaUXy/XFQPZTetwAgTeIsKiIW5uuULauqwEkLkLisjyqImTTtthEw7I5Kj8NumLi+b9mzv0LsFe6RRSSCj486avZ2unIN44pa8IShzJ+VD/nwDuFYVHHJfXGeCbpUBiKIxY42YO7RAfMjNsPGXCg+Sjy5tHa3MyCzpOa22pNzmOthnlooLQBU6zyrcCzw== 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:11 +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:09 +0000 From: Yangtao Li To: Andi Shyti , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/11] i2c: iproc: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:49 +0800 Message-Id: <20230705135159.33327-2-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: b9b66a2e-c64a-41df-7ebf-08db7d5f0713 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /BbZGF4A0oJRmnRuuMl25j5mXXlQ+fmhzOb2Q2PAWolKovaBr7Dbix2yZi9l8CgAnIO+pQlVdstLTjWgIlmHhv345i1q80jOMJubZbMI4N1vd2IWcT1f69fAC1ypqWYReKvsa/k8SUOns4cS/jTJW3JmiHihriBWTW5RWNmf7/iUzaYp/4dP6VMU+bWt/h07Je4e4ONcvmkwYaj4KYILw6MJEqSOaUSjawXrGmaHz0XLPHTEgTcNqIMuAtDTwXZ+3lMI2IfN5YJjCNzx9uf9bDSos51YesldIxruQJEzxZhEkL66rWS6prTu0hhhjvUVkPmxfiwmu2wgamWvKOtuwRGakB/RDAfjdNKWS0ddw2hucrzbLCep68Dc+4GzmwarAGLbu0YpGld9c0bRGDudtLm+nEGKNXiGMYbb4jj4LsYxYAAzEr54f+4JRzOISyR3/6uU/vx+lpwOi0FAsqIJmxfkiK8iefyf/eXev3qxNZEGmNJenvAcBXK36vgDwvpiBZI8dh5bqyq8DLy7x57RrhdR2ATi6q1lnPVml7CcUBLGq7eU169QvnAywKxAEPuKgI5eKXLVwFceYS4ZIyhHaT9ceBKliomkhr5bY0BAN97farvH0Hd5Jr4rubJ6p5n8 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)(5660300002)(316002)(2906002)(41300700001)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WWPohu1l4QSWaBWZyduJ9KPWlS2thA0GW7/mYs86O9UfjkIen2FkjGdDf4jsnL/2VNqION387EQ4BnHO8m54FUY1DAiQ0l5nOd4Xofkz1I04B448nRNTIXHhs7/mCSJZP5z5T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QSYtwJf6US0/W4w4L5A8IPD6onVTkQbOgzeytE06PwoEMRgg/npbf+CfPdD8q7qNAQZogt+yZ8xkH4D0WAQiJ2FxCENyZ/6MWndMx2rMrOMLBdLN235NCm0ZAWd1N1p/fj/ritYdkIRgxxKwrB6y8XHm/FXmuJgC1ZV5tlrG9C2jj/hqCOU3afLmzpu2H5Grpqt1yw12Y4YMEgVmf+n9VF2tzRO7BWNYOmvTTH5pwoUPujSbh9WLqOCoFB2udde4i2BE4z3/gMpi1+R+VjQX8CpS6JqygwTwNu4WVSvlh3yL2qIY4I8mIs9EkGXrguLJEbIz+9ExwxDkSu0SDOlGMpJc6HTL4fWgjauxHBK3QNOtAX2nL2osAeNUN8WG0s X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9b66a2e-c64a-41df-7ebf-08db7d5f0713 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:09.8521 (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: AS6VAk4HYCh9AX4QAbP0CxzZLCtlVQXDDwYUr+WZJHB66HISB4WZGkw+CA7HwoWVUvLxls2Cax40r8qlFii/bA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- 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);