Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp257193rwn; Fri, 16 Sep 2022 19:55:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6nIeYO+QrSgmX/03H+zcjum7JPqJm1RZDsAATNbaLSM6h217LvLgc5E5XUOvjK+524dRwm X-Received: by 2002:a05:6402:156:b0:440:b458:93df with SMTP id s22-20020a056402015600b00440b45893dfmr6553936edu.337.1663383315634; Fri, 16 Sep 2022 19:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663383315; cv=none; d=google.com; s=arc-20160816; b=iqTvItmgCbyzr26wnCExjul8XvJTAh/GTdKrL3+FXsjKK0rwKYeACk02IxyDwQPS1O HZKVGFHAl9akUWBG6LL/icYaz7E3L5GDYGgW72u2Sg+h8UINVsMZ7msDA7/KB/1xcGFo 77OGDS+mGkq4XcivnRGyRkxjbVyD97B1BswPqO1BX8zxYlMemOdO5Zoylb0IvzxaoqzC tRpPsTyhnBKAW0ZHggXuayigTA2t66yo2fqk1jQQU9WxfRpE2lm+f6p3Z3ONzR92wsLZ lEJJUbjRfB8ZkliGXwFRiMCss7ZMBdXMkpIxZ2uSnVnOJiNTnTEzBHT/ids6OPw6lyTu nDGQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=B4+4wlO/5VrguETQx2SddEgCTR9woztoqMbC5NuK6c0=; b=w0VOoLajKaKugvWr/2PKF/38fJAepEYTuwSPsC+pNMtXzwRKChGZ8HpNE48bm2dUsT iZg9NGHsBCdqNvL3imlu6FNGxsYn6xJHg5uTG7QNEUczzzWUcoEuoWnSvQWJYOnfLaDS FfEeVM5GiqLbyknjfRlyEBowsgRlpIvtrDM/bYA3NkuF4gxclsyugDCFVDWi/ax42pTw qMftBNPs+R3bU7UPMwvdTfxy1pw9HaiHLs3VbD58cGZY5cgd1PuFebxckAJTLFKoZyVo tyBMoXgwSypd6Z5JWvofXUidVYaXQHElhi0FgHcvHSa1Sws77whHONvKAKGLnyYy+Hqa wfMg== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id au19-20020a170907093300b007781bc042a2si15333906ejc.646.2022.09.16.19.54.49; Fri, 16 Sep 2022 19:55:15 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbiIQCjd (ORCPT + 99 others); Fri, 16 Sep 2022 22:39:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiIQCjc (ORCPT ); Fri, 16 Sep 2022 22:39:32 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8516B289; Fri, 16 Sep 2022 19:39:27 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MTw5m47Ydz14QbZ; Sat, 17 Sep 2022 10:35:24 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 17 Sep 2022 10:39:25 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 17 Sep 2022 10:39:25 +0800 From: Yang Yingliang To: , CC: , , Subject: [PATCH -next v2 2/2] pinctrl: ocelot: Use devm_platform_get_and_ioremap_resource() Date: Sat, 17 Sep 2022 10:46:34 +0800 Message-ID: <20220917024634.1021861-2-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220917024634.1021861-1-yangyingliang@huawei.com> References: <20220917024634.1021861-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 Switch to use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- drivers/pinctrl/pinctrl-ocelot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index c672bc2a4df5..d2c144611d4b 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -2073,8 +2073,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) "Failed to get reset\n"); reset_control_reset(reset); - base = devm_ioremap_resource(dev, - platform_get_resource(pdev, IORESOURCE_MEM, 0)); + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(base)) return PTR_ERR(base); -- 2.25.1