Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp745404rwb; Thu, 19 Jan 2023 02:02:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXs5/rLfchd2BQvuLRVMBLHLfH+pwRg/xR81MEAV1SmC60Fb172WKtJUVrhv0D/GfbpFfqo7 X-Received: by 2002:a17:90a:ba11:b0:229:ab5e:e123 with SMTP id s17-20020a17090aba1100b00229ab5ee123mr9075626pjr.40.1674122533786; Thu, 19 Jan 2023 02:02:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674122533; cv=none; d=google.com; s=arc-20160816; b=cYM84DdMBuDbeNJW/KnsODbu217q/BVGFsmZaunJyDQqLwAAj+hfXrd/HmsshJuxBC uq66Nt8fEUom2Q6Qbb77LSqL6nNz6eUsDaK4h4dg5MLjIlXOySLOrydQEpq/SDdP/kWm qXaOR3VHV/VzGyoFJ99x/sCEE7SebsaNdmLLQWdgt0EGSY6lenLD1BplEcDqrhbXubkw licYDQlJeH1OIn5m6myyHPZdMx7LROO4IsEam9hH2Vqh3A8EJVHkJNoLsLtbTtmv//ut 4vMxBmAwBvb+bvA/tS5xg0pITVUvbp2GcPKeF8ikIs9ukyVJ5pgjc0dYQZNxWIVVUyXj RYPw== 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=asRQuRWKvOzzZhyLrdOcWObwI61vjbj19wPGF+mP+9k=; b=WqaOcfoLmoLe8Ekx9jBeaigrE32yw/2htA1pfp8XEJxLsKdVvzURutRQ+lZPTBel7L SN608tbLKKy0NSe80+L3ECMP/sTTQ18ZkZlAgSJWpr1lW4+GjvDmc+FwwqYUCUdj9M2w vycy6WUVf2N5r0WHi2KZgXBHObLixt4a0Yw9ITjaDNjIXrK5Zykxl4E7Lr9kmpTNcZ8L 9c4ZSPJWPqt/qNjBl6/Y7J1mubKgt//iwaEbqi9hz/JEeuGju0BVLUP4z4OF38Tre2cG IfY35JGA8b/LDMp1A3OV7d8lzIX4yC6Muc6XpRHAU+IyNUK44QQeNMLOPQtyk4SqWLF0 vLKw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 200-20020a6301d1000000b004ce5301edd5si10282013pgb.711.2023.01.19.02.02.08; Thu, 19 Jan 2023 02:02:13 -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 S229880AbjASJVi (ORCPT + 44 others); Thu, 19 Jan 2023 04:21:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbjASJVh (ORCPT ); Thu, 19 Jan 2023 04:21:37 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2943367787; Thu, 19 Jan 2023 01:21:34 -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 4NyHF86QKDz8R03x; Thu, 19 Jan 2023 17:21:32 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.97.17]) by mse-fl1.zte.com.cn with SMTP id 30J9LK7E098576; Thu, 19 Jan 2023 17:21:20 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Thu, 19 Jan 2023 17:21:23 +0800 (CST) Date: Thu, 19 Jan 2023 17:21:23 +0800 (CST) X-Zmail-TransId: 2af963c90b933074addf X-Mailer: Zmail v1.0 Message-ID: <202301191721230148862@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?UTF-8?B?W1BBVENIXSBpMmM6IHZlcnNhdGlsZTogVXNlIGRldm1fcGxhdGZvcm1fZ2V0X2FuZF9pb3JlbWFwX3Jlc291cmNlKCk=?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 30J9LK7E098576 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63C90B9C.001 by FangMail milter! X-FangMail-Envelope: 1674120092/4NyHF86QKDz8R03x/63C90B9C.001/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63C90B9C.001/4NyHF86QKDz8R03x X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, 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 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 --- drivers/i2c/busses/i2c-versatile.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c index 1ab419f8fa52..219aa8dd4454 100644 --- a/drivers/i2c/busses/i2c-versatile.c +++ b/drivers/i2c/busses/i2c-versatile.c @@ -64,15 +64,13 @@ static const struct i2c_algo_bit_data i2c_versatile_algo = { static int i2c_versatile_probe(struct platform_device *dev) { struct i2c_versatile *i2c; - struct resource *r; int ret; i2c = devm_kzalloc(&dev->dev, sizeof(struct i2c_versatile), GFP_KERNEL); if (!i2c) return -ENOMEM; - r = platform_get_resource(dev, IORESOURCE_MEM, 0); - i2c->base = devm_ioremap_resource(&dev->dev, r); + i2c->base = devm_platform_get_and_ioremap_resource(dev, 0, NULL); if (IS_ERR(i2c->base)) return PTR_ERR(i2c->base); -- 2.25.1