Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp754039rwb; Thu, 19 Jan 2023 02:09:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXuAOUAsH/FppU+UjJRd0OlPsLuAd5coujGFdInev7fli41533l3UPlFHI1TAGWoWZG/aUav X-Received: by 2002:a17:906:26d7:b0:84c:a065:d723 with SMTP id u23-20020a17090626d700b0084ca065d723mr9405440ejc.44.1674122950361; Thu, 19 Jan 2023 02:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674122950; cv=none; d=google.com; s=arc-20160816; b=nrLGeLWzQm/wsJkVhNt6Y2hJWWZpiD4Lk7mZd/HOWuT9Vbx0k8c5uKbdNwlRyxpEZD znkNU44dZEZ95IZEj+E6kBAs1xEG5lz8PjK5ANmDCwih1NiRlOgEMew2GKYCXO77U4tu K+z3NAtmIXs8oomMPzeTNq870b3ekDFBGhxoD1sujnWXE5Ol5KbpkrvQOTTrqcS/BWdQ Np6r+5QyZLmVCBiNOLJN9NI4OsXVuvliGbEzSSY/hqvwDsDNAVl9Po1MG3ogHva8n+g8 u6VkQuKz+smmv2ruH2cqdKt/oZIKG1SNWBcjkYEBfJH36xfHaeRCcBO7UlbFi/PrRC3y nBhA== 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=fzubommXRbwsqXvM0V4yUyqwPSYCHv3fjj+ZELlNneM=; b=XvO88aBpbG0vanCxJzlL7qCZW9ev1z7j7Zu9XqfXb7Bs8pzotgF715UlUHr0bqJstp qWI6zK03lUMflwSh1gXFFEeNl0I8dsob7y4N6JDu0ezHdO3Im55YL5/BDdpH2i2/Suw7 rYhu5rDx70nhchdK3i1cifqtWJx0ncEDy3kAcwESO6TScQ6A6RmGA7Q0PyQ5vNw8iuNG y+W3cd4AEikKudb0zqjycTQjqPqQb367hdKJaaEcIv3/cGcEQDy2V3mo/JdChalN0+xh KK4Juslz68v3NIoo3b0I5twLBn/EHmzYgKbuOVVrii/5JCe6Cu0+YKkbbvw62OjBPLoc gjVw== 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 sa39-20020a1709076d2700b00872b0aff346si8332675ejc.778.2023.01.19.02.08.58; Thu, 19 Jan 2023 02:09:10 -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 S229575AbjASJPo (ORCPT + 44 others); Thu, 19 Jan 2023 04:15:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjASJPm (ORCPT ); Thu, 19 Jan 2023 04:15:42 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D70724C0D3; Thu, 19 Jan 2023 01:15:39 -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 mxct.zte.com.cn (FangMail) with ESMTPS id 4NyH6K49pwz501RL; Thu, 19 Jan 2023 17:15:37 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl1.zte.com.cn with SMTP id 30J9FTfN094441; Thu, 19 Jan 2023 17:15:29 +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:15:31 +0800 (CST) Date: Thu, 19 Jan 2023 17:15:31 +0800 (CST) X-Zmail-TransId: 2af963c90a336bc4119e X-Mailer: Zmail v1.0 Message-ID: <202301191715319948743@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , Subject: =?UTF-8?B?W1BBVENIXSBpMmM6IGFzcGVlZDogVXNlIGRldm1fcGxhdGZvcm1fZ2V0X2FuZF9pb3JlbWFwX3Jlc291cmNlKCk=?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 30J9FTfN094441 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63C90A39.000/4NyH6K49pwz501RL 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 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-aspeed.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index c64c381b69b7..d3c99c5b3247 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -979,15 +979,13 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev) const struct of_device_id *match; struct aspeed_i2c_bus *bus; struct clk *parent_clk; - struct resource *res; int irq, ret; bus = devm_kzalloc(&pdev->dev, sizeof(*bus), GFP_KERNEL); if (!bus) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - bus->base = devm_ioremap_resource(&pdev->dev, res); + bus->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(bus->base)) return PTR_ERR(bus->base); -- 2.25.1