From patchwork Wed Aug 28 08:48:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 1977678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-gpio+bounces-9254-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WtyXr5ZXWz1yZd for ; Wed, 28 Aug 2024 18:40:28 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 71E771F25E06 for ; Wed, 28 Aug 2024 08:40:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C62B15B98E; Wed, 28 Aug 2024 08:40:20 +0000 (UTC) X-Original-To: linux-gpio@vger.kernel.org Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A360F8288F; Wed, 28 Aug 2024 08:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724834420; cv=none; b=HEACgXnEj1soRLFCl1gYVktEP66TZBHJoE3rGsB09jzvN1HdYhZIsR34khh5f3O8omy28X9QxVksnVnaSUo4smbAD+QeNyHup7L2IVD6kNZhG+wC1ZgOJTto1gCfRwV5M3KEB4i+ZxP1ATdVSkhmxP29zak2reYKPLMNNqnAtHY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724834420; c=relaxed/simple; bh=j805Jr3asHAIe8ISvsaNPdAkf6ziOcJ5IkdNLIWyWYw=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=bgn4KNkdbcz0p5XEVzPhMIaeL3F6RR0qr8v49t9uqcLfIwaQUBhhqkRU1F4glTFpishaXD1Qy9C2srMCMW0AVDGgsf5z+MVs6m5NoDxf8NWgN6H0z2YIMr8wLJzIJiBv6BXNwePbnKYG9EZBKw9UXPkJY4DVd3yc8wPaihK7thg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4WtyXJ3S4Xz1S98V; Wed, 28 Aug 2024 16:40:00 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 43A251A016C; Wed, 28 Aug 2024 16:40:12 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 28 Aug 2024 16:40:11 +0800 From: Jinjie Ruan To: , , , , , , CC: Subject: [PATCH -next] pinctrl: bcm: Use devm_platform_ioremap_resource_byname() Date: Wed, 28 Aug 2024 16:48:10 +0800 Message-ID: <20240828084810.2526847-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemh500013.china.huawei.com (7.202.181.146) platform_get_resource_byname() and devm_ioremap_resource() can be replaced by devm_platform_ioremap_resource_byname(), which can simplify the code logic a bit, No functional change here. Signed-off-by: Jinjie Ruan --- drivers/pinctrl/bcm/pinctrl-ns.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-ns.c b/drivers/pinctrl/bcm/pinctrl-ns.c index 6bb2b461950b..bacc1a00506d 100644 --- a/drivers/pinctrl/bcm/pinctrl-ns.c +++ b/drivers/pinctrl/bcm/pinctrl-ns.c @@ -211,7 +211,6 @@ static int ns_pinctrl_probe(struct platform_device *pdev) struct ns_pinctrl *ns_pinctrl; struct pinctrl_desc *pctldesc; struct pinctrl_pin_desc *pin; - struct resource *res; int i; ns_pinctrl = devm_kzalloc(dev, sizeof(*ns_pinctrl), GFP_KERNEL); @@ -226,9 +225,8 @@ static int ns_pinctrl_probe(struct platform_device *pdev) ns_pinctrl->chipset_flag = (uintptr_t)device_get_match_data(dev); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "cru_gpio_control"); - ns_pinctrl->base = devm_ioremap_resource(dev, res); + ns_pinctrl->base = devm_platform_ioremap_resource_byname(pdev, + "cru_gpio_control"); if (IS_ERR(ns_pinctrl->base)) return PTR_ERR(ns_pinctrl->base);