Message ID | 20230316054325.108457-1-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp305861wrt; Wed, 15 Mar 2023 22:58:32 -0700 (PDT) X-Google-Smtp-Source: AK7set8sQvQwQgHHmEvcAMR+TQOWz0fEcT0N8t3P7IvcWkf9o+CTQ8NOpvj85JH0T3byiL0VHuW3 X-Received: by 2002:a17:903:1111:b0:1a1:460e:6a5d with SMTP id n17-20020a170903111100b001a1460e6a5dmr2450037plh.49.1678946312475; Wed, 15 Mar 2023 22:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678946312; cv=none; d=google.com; s=arc-20160816; b=0YL1foKQQPhs7kQjra/+6HlYQIRa02Nl7srFj9xcGSPq7dsRurG6JKebJdEmYqDDbH qpVDrcQYC32iMdOauanTCE+HKX5RwXDy0+zAsDG3ZTfOf9+fLfwiyovfY88dtpYCq0lB LZ3mT+h7TiCStMnifwqvvcO2tH6/xNQHM4EGgj7Sh5mhMvFugpDAk7OtuSaF5FJ2m84b S6lPlQzBbAk06dDRP61eDsgtbFkI3wtN/JgFnjxaNZyTeCNbozkKNAdb2kxS4DV4RrmM l6TwadkZq0CpVPPPsys8MRsaTNXON+Qo9XDqAHnuTuVy/kvAejtSRkdO+XBi679ues88 ScPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6l627eZTUcpIw86msPDYJ7dIS1qc/5SEFYlBQkLI4FU=; b=hkQvMUCeAYCK3mUHz5pzuEyhOFQpMY11SpKZRY24XvKsT2/BsNJGIqngS0xaXY/nSm ylhzI9ULIX+7UebFmR6hG3zMFx8fVEgQA43kOrm9QKverxyp4ecxnCC5aVG1VO9da02n ENneiExUqZ/nYR1PBMVIhbXuZsuN23WeSKevveM3aTYdWa30HCx7E5ytw669KaE3VLyj fiZegktXPC4pglEfSOBk4n58CDwMROMwf8PywfyXiZQNbipKGshPgiTVfImV46AcxJMD wi5XhsSxIz8L2fpdTfF6QBQ+JwdnCmkGFjxBfu36YWcd9ohqeY5yFrqNh5DRMwf+dRvM 4CvQ== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ju9-20020a170903428900b0019f38df24cbsi7154830plb.161.2023.03.15.22.58.16; Wed, 15 Mar 2023 22:58:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjCPFnc (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Thu, 16 Mar 2023 01:43:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjCPFna (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 16 Mar 2023 01:43:30 -0400 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 586697DFB9; Wed, 15 Mar 2023 22:43:29 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R591e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VdymIEA_1678945406; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VdymIEA_1678945406) by smtp.aliyun-inc.com; Thu, 16 Mar 2023 13:43:27 +0800 From: Yang Li <yang.lee@linux.alibaba.com> To: michal.simek@xilinx.com Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com> Subject: [PATCH -next] i2c: xiic: Use devm_platform_get_and_ioremap_resource() Date: Thu, 16 Mar 2023 13:43:25 +0800 Message-Id: <20230316054325.108457-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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?1760502808494800343?= X-GMAIL-MSGID: =?utf-8?q?1760502808494800343?= |
Series |
[-next] i2c: xiic: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
Yang Li
March 16, 2023, 5:43 a.m. UTC
According to commit 890cc39a8799 ("drivers: provide
devm_platform_get_and_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/i2c/busses/i2c-xiic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 3/16/23 06:43, Yang Li wrote: > According to commit 890cc39a8799 ("drivers: provide > devm_platform_get_and_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com> > --- > drivers/i2c/busses/i2c-xiic.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c > index dbb792fc197e..0eea00d10545 100644 > --- a/drivers/i2c/busses/i2c-xiic.c > +++ b/drivers/i2c/busses/i2c-xiic.c > @@ -1233,8 +1233,7 @@ static int xiic_i2c_probe(struct platform_device *pdev) > i2c->quirks = data->quirks; > } > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - i2c->base = devm_ioremap_resource(&pdev->dev, res); > + i2c->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(i2c->base)) > return PTR_ERR(i2c->base); > > -- > 2.20.1.7.g153144c > Reviewed-by: Michal Simek <michal.simek@amd.com> Thanks, Michal
On Thu, Mar 16, 2023 at 01:43:25PM +0800, Yang Li wrote: > According to commit 890cc39a8799 ("drivers: provide > devm_platform_get_and_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com> Applied to for-next, thanks!
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index dbb792fc197e..0eea00d10545 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1233,8 +1233,7 @@ static int xiic_i2c_probe(struct platform_device *pdev) i2c->quirks = data->quirks; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->base = devm_ioremap_resource(&pdev->dev, res); + i2c->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c->base)) return PTR_ERR(i2c->base);