From patchwork Sat Jan 28 06:53:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 49798 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1221005wrn; Fri, 27 Jan 2023 22:55:20 -0800 (PST) X-Google-Smtp-Source: AK7set+QXpeItmieAX91n4u6P+sGGmtFdpNIdMnpaN9mZfRGWLlh23GBD2S2PhLE5YyXw2/ECAqq X-Received: by 2002:a17:90b:3a8e:b0:22b:ec81:c385 with SMTP id om14-20020a17090b3a8e00b0022bec81c385mr17753065pjb.25.1674888919907; Fri, 27 Jan 2023 22:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674888919; cv=none; d=google.com; s=arc-20160816; b=PTQ8UQ2pYUK7FEkPCj5zBlJz9cSP+z0+k8ZfRCdrE/g4zRATrInI246BEANGdTWLsQ LyaLlpxxjoE8AAnmqRKp6/mOLVT5AIIMTpJL/UWmZlr1cN4Ua3Iv2xhn0cm45w/JjtaU PmFYGMmFyazj9/i6YcjDHe8epcPGBry3oRUTirt66nrgoubh4fZX6vElbaaSZA37OxB4 d1IFwtq+hw8sj/rXdO8SwD/qou1goaRhy834apGAbEynYm75ETmz1Z+WxgEztEdpaT3r J+SF7bEy5Evni9Yi02MHMkvsx9vq4uVD2w/vK+rcY1Zax01iY3RULk0kG5GfYBRIIe4Y yKxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=sHjebsKxzdLJNn0cX62DPS+LljG0svNuEXAA76W/kms=; b=J5XvQaXVVpoycNseYNBBD3hDimljgtNF6OXKTC5InM3XFj7UX5+sQIkCdSEV2/ztHb 2DdnpL3fMK9JnAJXwXaSwrrlGm+deRMBBf0kzH+RPETL8ZsV7yki980bvB2al2VXtRSg iwQ9gJbwpSqaURYpJnIn1c4cCZA2hefAWbwxGitjV2OOxpbI5sXED5v92Ofl4AFoUnyt LXmwsXk0XwbSzjdo86YiNPV23wOLOliRrg9t2AtGUFSosD9K/R/3fKEzHiCPLOr0jW1e KetGmxC8e3Qj0X6QHbm7oGP3vT761iB/SUWyyOrXSXmmd1o1Nkevp7EtKgtUfBDQ3NJW TEEA== 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=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w24-20020a637b18000000b004da09fcce2asi6604366pgc.36.2023.01.27.22.55.07; Fri, 27 Jan 2023 22:55:19 -0800 (PST) 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=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233212AbjA1Gx3 (ORCPT + 99 others); Sat, 28 Jan 2023 01:53:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233206AbjA1Gx2 (ORCPT ); Sat, 28 Jan 2023 01:53:28 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 321AD577ED; Fri, 27 Jan 2023 22:53:19 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4P3lWx5l8gz6FK2Q; Sat, 28 Jan 2023 14:53:17 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.97.17]) by mse-fl1.zte.com.cn with SMTP id 30S6r962078134; Sat, 28 Jan 2023 14:53:10 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Sat, 28 Jan 2023 14:53:12 +0800 (CST) Date: Sat, 28 Jan 2023 14:53:12 +0800 (CST) X-Zmail-TransId: 2af963d4c6582f746de2 X-Mailer: Zmail v1.0 Message-ID: <202301281453121890132@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?b?W1BBVENIXSBpMmM6IHhpaWM6IFVzZSBkZXZtX3BsYXRmb3JtX2dldF9h?= =?utf-8?b?bmRfaW9yZW1hcF9yZXNvdXJjZSgp?= X-MAIL: mse-fl1.zte.com.cn 30S6r962078134 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63D4C65D.001 by FangMail milter! X-FangMail-Envelope: 1674888797/4P3lWx5l8gz6FK2Q/63D4C65D.001/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63D4C65D.001/4P3lWx5l8gz6FK2Q X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR,UNPARSEABLE_RELAY 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756248323906559426?= X-GMAIL-MSGID: =?utf-8?q?1756248323906559426?= From: ye xingchen 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: ye xingchen Reviewed-by: Michal Simek --- drivers/i2c/busses/i2c-xiic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index bee5a2ef1f22..5114888f2916 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -752,7 +752,6 @@ static int xiic_i2c_probe(struct platform_device *pdev) { struct xiic_i2c *i2c; struct xiic_i2c_platform_data *pdata; - struct resource *res; int ret, irq; u8 i; u32 sr; @@ -761,8 +760,7 @@ static int xiic_i2c_probe(struct platform_device *pdev) if (!i2c) return -ENOMEM; - 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, NULL); if (IS_ERR(i2c->base)) return PTR_ERR(i2c->base);