From patchwork Tue Mar 21 11:44:06 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: 72832 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1732836wrt; Tue, 21 Mar 2023 05:02:00 -0700 (PDT) X-Google-Smtp-Source: AK7set/UGhfAFZK4jqrbQxl7cl/TW7dstqu23HvWTySh5ho26nvfbgJ7E1CSAErtRBc/rNoIKsFz X-Received: by 2002:a05:6870:d682:b0:172:25a3:65da with SMTP id z2-20020a056870d68200b0017225a365damr998274oap.0.1679400120543; Tue, 21 Mar 2023 05:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679400120; cv=none; d=google.com; s=arc-20160816; b=FvfC2IUOiUS3Y4zc3bEUXJWxfgvBqhCdLDj48b5rLpungX2Ti2EJO9HevwDUdECxp6 N/1kO+d915xvJdefyLeDX67Ki8emLEF2EsP47tkotpVf860UabheH+2V0yU9/zluM6tL Dmra4bPPYKUUM0QyQDhCPH8eDjvLTvB95+xxXFwvgQMD4nf3QN7E3TogtCzW3vnUqK47 /x8yXu994rCzGmHAa/pFHUg1Hx9WdqAush4YFEP2ewyHkgANNws0r7KmK1vvRVqINmrE y05ZCR0tZP/BXn74dbpkhY8RLgQdqS3zPoZc3j4KKlrA3HfdLUCywXuerpwRV6JRbOEI qj1w== 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=2Ahza3zfvnU8qFFYjBYef/rT8r7vx5yFsvdDn0u7GKg=; b=MOZJFMmlIQNUyLYpHKiVk2xMGZYdx9Ye7t+Tje2OMTKEbxOwskJjF6PmA6tjvyxTXT fkBzHzO/vm8Op7zBiLbedaOil6UaOPR5a0RhkPfIuH/zmVv1QQUAQO5fcxjz1IdUSVDE RUjcVtrHe4TmRDfGqZM/S/2Q52b+rBUKA7QoYXRYyUu//0+psoTBC90myOYbcXNUmsE4 IvtXiiKXgAUM0okL5iSL9yWPsj1Bc9sRn/nfl0gU58L91uxufz4Zxv8jYrObZvajMdgS UJwIKz/iv4ihuKazn9oPVUiJWC6XnLu02s1Y6FWeFR7PbYjXEywSKTW06Sw2WCcnrsdu lnew== 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 h13-20020a056870d24d00b0016e77d8db24si11591344oac.253.2023.03.21.05.01.20; Tue, 21 Mar 2023 05:02:00 -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=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbjCULoQ (ORCPT + 99 others); Tue, 21 Mar 2023 07:44:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjCULoP (ORCPT ); Tue, 21 Mar 2023 07:44:15 -0400 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EB2B25956; Tue, 21 Mar 2023 04:44:13 -0700 (PDT) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (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 4PgqWc1Y6lz6FK2Q; Tue, 21 Mar 2023 19:44:12 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 32LBi3le075071; Tue, 21 Mar 2023 19:44:03 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Tue, 21 Mar 2023 19:44:06 +0800 (CST) Date: Tue, 21 Mar 2023 19:44:06 +0800 (CST) X-Zmail-TransId: 2afa6419988621d-ec893 X-Mailer: Zmail v1.0 Message-ID: <202303211944063761253@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , Subject: =?utf-8?q?=5BPATCH=5D_i2c=3A_brcmstb=3A_use_devm=5Fplatform=5Fiorem?= =?utf-8?q?ap=5Fresource=5Fbyname=28=29?= X-MAIL: mse-fl2.zte.com.cn 32LBi3le075071 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6419988C.000/4PgqWc1Y6lz6FK2Q X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,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?1760978660796715915?= X-GMAIL-MSGID: =?utf-8?q?1760978660796715915?= From: Ye Xingchen Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Acked-by: Florian Fainelli --- drivers/i2c/busses/i2c-brcmstb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c index 69383be47905..ef942714642a 100644 --- a/drivers/i2c/busses/i2c-brcmstb.c +++ b/drivers/i2c/busses/i2c-brcmstb.c @@ -575,12 +575,10 @@ static void brcmstb_i2c_set_bsc_reg_defaults(struct brcmstb_i2c_dev *dev) static int bcm2711_release_bsc(struct brcmstb_i2c_dev *dev) { struct platform_device *pdev = to_platform_device(dev->device); - struct resource *iomem; void __iomem *autoi2c; /* Map hardware registers */ - iomem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "auto-i2c"); - autoi2c = devm_ioremap_resource(&pdev->dev, iomem); + autoi2c = devm_platform_ioremap_resource_byname(pdev, "auto-i2c"); if (IS_ERR(autoi2c)) return PTR_ERR(autoi2c);