Message ID | 20230705135159.33327-2-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1890143vqx; Wed, 5 Jul 2023 07:02:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlHxdo9IITT/Pi+BfZt/Gx4RCu9+hdwmTflyuksOgrgzFdrjcvScsyHrS2D+lxLiJtpa1JFN X-Received: by 2002:a05:6a21:33a9:b0:125:c3f7:f863 with SMTP id yy41-20020a056a2133a900b00125c3f7f863mr3495375pzb.8.1688565745843; Wed, 05 Jul 2023 07:02:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688565745; cv=pass; d=google.com; s=arc-20160816; b=YzKW2dYf82Pw7bSjQkgfCtUZxs9tYZZS5+bBt3FqwJwmVqGXGObpzEyEj4v2w/+m4Q vzhMCSqi+DO/rM5ArXDQSOsw0o2e3ZLeJ9Phd9K0czVywzKwcGtBYSAMeDA+3tnXSnRp DE8BRhIE3SrVgwvPGExecM8FK8hX2tVWPUWvZtqffbmDdLbercoreeAvvT2UmRiI81fQ y3n1xHMzk8XhDn7MKY4P4fvyDvBCazXCFiMVgFEPeeLeKUb9ot8FSV6noKDX/VnrNPMW dwCBvMT0QpChQKcybXMZNCUUDthinP6/ZAE1L51HNwv7k9b0oPLxqLFjJPcT07VaLpQe p1uw== 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=9t6QskThFSp8iFbL7euFZmsipjxCImrO/1Qs+sOCL+c=; fh=2wKlODlnQ6NQDS8Wb8FE7ivSLWYMw8L6iKLxo2JgNLw=; b=i60Y2uyp03zjaTWi5XSROzVmgmMP4od1pBW9lL+IheNkUW2/mNChbxf9U8RHcDnkIo otEmMEeG+M1oPNZ0oxk0EAPnanVVFGdMZylgJW1u0kkJGVHYMBDbST6INvvjMgUaP6Te B86sBdG869deJFXhSaQltvOLHV6FGsahVW3hNXmkAOpNU/QVSJy8URI92pI1XEwsBlFu ICZXINckz4Jlek8YcKLSLKU0FgYoOnjcFFQwgDjlAaGIBdoJQrYLk+1tKYiRBVfTXwIZ aGq28PjixoylxVIqT+Hl2qlt+KNfUmB1kJIAeRwEaIW1jW1ElyZ5GdQQLmB+wTuDzTVt LLDQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=j0XgzB9d; 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 i62-20020a638741000000b005443ff97149si23718009pge.331.2023.07.05.07.02.07; Wed, 05 Jul 2023 07:02:25 -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=j0XgzB9d; 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 S232376AbjGENwS (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 09:52:18 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <frank.li@vivo.com> To: Andi Shyti <andi.shyti@kernel.org>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com> Cc: Yangtao Li <frank.li@vivo.com>, 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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/mCSJZP5z5TfndJjwSP1Xf1CPAOWG9I18fm31eer3s/vzobZZqM5BZ0kzUvh19pheO0FbV+UfMs8MPVo+cxqk8kVy3RO6rWWL2sZWfUcY3TRW5UhLgxNBIISzul8t+Wv78caJzoa7Yc6lrnF5mJENDRr5gbbF8qG8IFwFPdQGvzrwMh11uC13H4L6QTCQH7buhKAaKwbaYZwYjocGIR7rQLM/Pce6iPGB+bvGGyBhK7+EP+vC/uVZeZEKudyNWN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bh9WLqOCoFB2udde4i2BE4z3/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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770589515745452041?= X-GMAIL-MSGID: =?utf-8?q?1770589515745452041?= |
Series |
[01/11] i2c: at91: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
李扬韬
July 5, 2023, 1:51 p.m. UTC
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/i2c/busses/i2c-bcm-iproc.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
Comments
On 7/5/2023 6:51 AM, Yangtao Li wrote: > Use devm_platform_ioremap_resource() to simplify code. > > Signed-off-by: Yangtao Li <frank.li@vivo.com> > --- > 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); > Acked-by: Ray Jui <ray.jui@broadcom.com> Thanks.
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);