Message ID | 20230710063351.17490-10-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 v5csp4830859vqx; Sun, 9 Jul 2023 23:58:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDMkBXUee7a5zKdLYze7z6jO4pUY/IT1lUMpDS5bscqSbfygg4K1DhKPH61ML30Ms8Z6e+ X-Received: by 2002:aa7:d448:0:b0:51e:36b8:34e3 with SMTP id q8-20020aa7d448000000b0051e36b834e3mr7999328edr.25.1688972301807; Sun, 09 Jul 2023 23:58:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688972301; cv=pass; d=google.com; s=arc-20160816; b=TTyGZWsLGAsOJFwh59uaSxLvdbD91O0z966+fx+zyeivtwt+dcQ++Mciy8P7/Y4r+V C8kAul+m274/dd2/TVWxjIX78l1NeRux5rebh7F933eE/rHGCpTLOFrJmGoS9/dd8Xdo VaI1nHkX2KYQ5UA1fXJzluu762Ry/VVyVhTc5/YH714z2Erfr77Z+p656uWMtMEIoMeD u/M+VKmyM3TUg7V0ZjQmwXXxNE4/3Rx27mTqcC636mN3V427aRjAuLgT8oK7LmvGq3t8 qjKr7o6DEREhFmX7CW0S7zkfj3tRe7D+kYEO/rugXsSUQT212nQB/xDmj/1axkFwFpON OK1w== 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=TH2zgzreA0+1DLz3CyJ/QJfaeMbLJAdZzM+utAmlUvQ=; fh=8khidHhe7PYeyWX6BKdwemLQfzOxbX96FdKgEP7IX/w=; b=UG5GWrHhPKeLmSm7MpY53moNSo2pYo4NzrpgMxKpQMoWMIcdX0db5gAr3HPvVTRocY bYqFCSy3Y8dsA4rK5KHP6QslBCBl6t+KRAAZTuCk+25ZC6sWIUmeDEH1d9UEiFYx5nzK TxjVd6ey6KlAU7ts2/xmiUCZtvjPz1ljp/dV6uX6FV9eNOa4vVSpS09bJxFATSqzSSnC 55EouFoHq1uRrVasuB1ukE5La6IKc6B6QU/av1LwKdVf1MfYfyBLe5oZy3HIsigcH2Cy kwgMLjjDwyE2Wz5CdV3/T/KGODjAVut2JrRIwxv7tVfttzslw4H/xfPVxFmjiygza+o0 hRiA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UO+xLrNb; 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 h9-20020a50ed89000000b0051de3b9e331si8146874edr.561.2023.07.09.23.57.58; Sun, 09 Jul 2023 23:58:21 -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=UO+xLrNb; 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 S231462AbjGJGfq (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Mon, 10 Jul 2023 02:35:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbjGJGfQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 10 Jul 2023 02:35:16 -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 99D3E1A7; Sun, 9 Jul 2023 23:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QaUQsh5qDFOTfEx6db8ANOYQkFyyysSLy6cYC92i6sfKVFa1/JUL7Li0b6oFS0VTuYtRMZL+DMu1/8OwWlaJG10Bo9OLB2tI811S0m+HHbmbTY+SPDplQ59/My+bbjXvnjlVxs+SP5KUKJ6fSt9R825z6grxDdyG9w+feR6CohtgXpQhmUCVuuyUehYBf/WA41ZxA86MmLDBdwNci7FlZF4t8G1O2PoDio56D9uu2nTGbm+7IUGbZc6hqgZzCLC6VjiRmB3vrzgcSesNPd2KbbpNxivlEqtuy8HpetXvg+o2ZaOcejc84aedGNGuWCNogcAljuoa+wQqVfAhw4Eefg== 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=TH2zgzreA0+1DLz3CyJ/QJfaeMbLJAdZzM+utAmlUvQ=; b=VCmJUHEmTor6uadsfRY8hBNamiyCrLgeiSQw+7s1DL5s//K+tqJ2k4OrKXCGdWTgRRlWD1DSTxMjXlhfhOgq+8Bl0YKAeQJO35mzwxecDrao2cl6hKNhjTW+I9Jsa74jdIaKLTVqGutzPETVHGdVDBM83RUQ8u9VjPjyI1GepZckRIp8yRdHojX/c73mSWu5GxQwFN9Ly8mqmz51WEauuPe+6hncFmGwJ1zUy5hINA/p+/N2TQwGgpjT28yIuuLjYzsJaqBAoVgy7XcLP8Dd3UwbpKkBkuwzVALf9HlYFmfm7aGfjp58fPPYsqd/M9ysc1f9xlU4JVYx4XJap1O2Hw== 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=TH2zgzreA0+1DLz3CyJ/QJfaeMbLJAdZzM+utAmlUvQ=; b=UO+xLrNbHBt95/TzL3zFGbrgWZRCgSN5zRtD8YligEzY2Zxy4ieNHoJ2SWjD0oP752fRww+ogqdumB34sAp31jBAmDcK7/5fQ+RirfOXfceIDvr/hvidjFLSM5ZTtnxp61z6FPPmqm7El60KgFwmBstrxcSuSYVP/LSWpEtHA2wKyW+swULmYNL3qCWT/5B9QCVgeZ0buUgGZbm3X/UbVpeJC28RgUi5LMZnvePKd2HZqdpKkj6S2Y09/U1PV06LYqnyOsi4N8GtFbB8mrasCfad1E7N0s63lk+yKpc4VFXwh0L1LP4vvWMCP32wg0YxkeHweirRlkGMp2tJ2K+u6g== 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:23 +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:23 +0000 From: Yangtao Li <frank.li@vivo.com> To: Andi Shyti <andi.shyti@kernel.org> Cc: Yangtao Li <frank.li@vivo.com>, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/11] i2c: pxa: Use devm_platform_get_and_ioremap_resource() Date: Mon, 10 Jul 2023 14:33:49 +0800 Message-Id: <20230710063351.17490-10-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: e1fd90ad-2c68-41bb-77d1-08db810fb2f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eLtBHtbVNmhAlwxsjm5LuLNggWJnNy6yDeTPxeNtHUrpcgTiNXbyBfyepnykVRWRsxFpPOA3oTOQsbc/gVSYO9g0c3GQ18M54n7c9bXkT68qnINJu5CTF/MIqiBcE7Cx53tj0QnwlqF4Q+yulnmrEgaG+ky3VFyyqo3Dq/EhwNoUlMLOiBJYI18i3nc5AACGMmBMNmHM+9ghVgQy8BZMznS56FekiYdNAGrYd9EdRtyn6sDBIov6st3RvpT9piZVLbzGbV69xCkDNgi72yMf+5m210M0RcW4iW+5R+vp/H3y4fgcqeyN8w1PTfVDpWwVyOaS4KNA1Xv0zXybiLhAguX01FvFoaoJsyCSGgVp6Cyy7zQD7tUYGKFL0hTz+23drlXMza5q67ShQfTQbccizEe+MdzkV5UFmqtnJPJzvg1phrAcDG3ZdbGDBtUPKHVq2zAVjAeRg+cUcAuxWQ1WzA/836XwsCmHCN0ng33JNB0Yt8uWY3hwtopiLFCgWdBQPoT54RJ+bOOtMunj2wBwhuM1fNNjT8ejntzuzQtCvzxVduNd3oznN3QtaGx2NOjIuvuFoKJN8rYyWb213VQIL5+FnbZ3sCF72NrTTwuvox0fTGAc+0x9SCuZ8ukyLXvdBnArOUuK73GRiyjrsw59fFCQRdKJRB9znRdLC+6AhNg= 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)(83380400001)(36756003)(86362001)(2616005)(2906002)(66946007)(186003)(6506007)(1076003)(26005)(6512007)(38350700002)(38100700002)(8676002)(6916009)(4326008)(316002)(66556008)(66476007)(41300700001)(5660300002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yJVplNEK0cOxFegAPZ0aeq87TQVOA7IvpiGngqVPVuzrHgQxFg4SX1i1byHA6auIsrdiE0IZSuDHYmbmXpCyBtQ7k8FkgPnhVSnnloDRj/QizySjQkP8d4X0HPqyLQvxC66lJ/Fz4lxJIytUntY4MxsD5wlJQNvQ3A1Msx7KIv6sbCTKVkhQvPJHC9xTwBNd7IBWjLGzXTInApPPLmXL3y/u11Mix9FlLG/sTCepevVdwYrOrRP/zZYSzwVOK+vnFhlSHVLtQS7T+/Ctg8Z8OfzdHXatVNPwvjZ9S5IJeCgngGL0ONZnHERDIu3C8VHsdcEhrxfaQL74d3LWz14iyHP6l6hVkZTjnVfwj2TgjYR7tohmgMTM/xhb3cTEI7L7haT7bkoz5UsgeDFrkIjd0Xg2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fBkSqDBXzT2dg1+e+BSsXFr1Srxk0FCdYaqwMR7vidy38tg956f8sfU7TS3ZYIb7nfhkBrEvqz3LISnTLR/G6m8bVM1csQXLthvE2njll/ww X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1fd90ad-2c68-41bb-77d1-08db810fb2f2 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:23.1972 (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: LoibAWyUJ6jlBh9wyEuMm967CThmpsUjYDjxT5ceAf1WVSfcBk8OxcCPkz5KPtUR8IBKT8/iPWyxGm02qtIS3g== 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771015820070128716 X-GMAIL-MSGID: 1771015820070128716 |
Series |
[v2,01/11] i2c: at91: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
李扬韬
July 10, 2023, 6:33 a.m. UTC
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 <frank.li@vivo.com>
---
v2:
-s/devm_platform_get_and_ioremap_resource(pdev/devm_platform_get_and_ioremap_resource(dev
drivers/i2c/busses/i2c-pxa.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Comments
Hi Yangtao, On Mon, Jul 10, 2023 at 02:33:49PM +0800, Yangtao Li wrote: > 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 <frank.li@vivo.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Andi > --- > v2: > -s/devm_platform_get_and_ioremap_resource(pdev/devm_platform_get_and_ioremap_resource(dev > drivers/i2c/busses/i2c-pxa.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c > index 937f7eebe906..b630bfeaeb85 100644 > --- a/drivers/i2c/busses/i2c-pxa.c > +++ b/drivers/i2c/busses/i2c-pxa.c > @@ -1362,7 +1362,7 @@ static int i2c_pxa_probe(struct platform_device *dev) > struct i2c_pxa_platform_data *plat = dev_get_platdata(&dev->dev); > enum pxa_i2c_types i2c_type; > struct pxa_i2c *i2c; > - struct resource *res = NULL; > + struct resource *res; > int ret, irq; > > i2c = devm_kzalloc(&dev->dev, sizeof(struct pxa_i2c), GFP_KERNEL); > @@ -1379,8 +1379,7 @@ static int i2c_pxa_probe(struct platform_device *dev) > i2c->adap.dev.of_node = dev->dev.of_node; > #endif > > - res = platform_get_resource(dev, IORESOURCE_MEM, 0); > - i2c->reg_base = devm_ioremap_resource(&dev->dev, res); > + i2c->reg_base = devm_platform_get_and_ioremap_resource(dev, 0, &res); > if (IS_ERR(i2c->reg_base)) > return PTR_ERR(i2c->reg_base); > > -- > 2.39.0 >
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 937f7eebe906..b630bfeaeb85 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1362,7 +1362,7 @@ static int i2c_pxa_probe(struct platform_device *dev) struct i2c_pxa_platform_data *plat = dev_get_platdata(&dev->dev); enum pxa_i2c_types i2c_type; struct pxa_i2c *i2c; - struct resource *res = NULL; + struct resource *res; int ret, irq; i2c = devm_kzalloc(&dev->dev, sizeof(struct pxa_i2c), GFP_KERNEL); @@ -1379,8 +1379,7 @@ static int i2c_pxa_probe(struct platform_device *dev) i2c->adap.dev.of_node = dev->dev.of_node; #endif - res = platform_get_resource(dev, IORESOURCE_MEM, 0); - i2c->reg_base = devm_ioremap_resource(&dev->dev, res); + i2c->reg_base = devm_platform_get_and_ioremap_resource(dev, 0, &res); if (IS_ERR(i2c->reg_base)) return PTR_ERR(i2c->reg_base);