From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B27F2C433EF for ; Mon, 25 Jul 2022 12:10:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ED0C1841E3; Mon, 25 Jul 2022 14:10:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="X2b0qshA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8B37684193; Mon, 25 Jul 2022 14:10:27 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 90BB58419F for ; Mon, 25 Jul 2022 14:10:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 519DF60FE1; Mon, 25 Jul 2022 12:10:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 923B8C341CE; Mon, 25 Jul 2022 12:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658751018; bh=Vay8Am/ElFGU0VYBB3BUHbXodCkVwWnUH19BkqLXn3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X2b0qshArQR/meEDYyikzcfT7Efy0WPA2ek8LnIk5vsRtKL5Mwa1Phz2urj00qp0R AzkbnEL2d086TZbAQok+ZvFihegWOdtDwjHtOKqk6gO5Y6onw4uNvtgH6Y+bdCIfJu YeXlBaGFZQNg0uhDQy9XqJHbrPPb8IWqI7Wy9IQufO1l8IkJmU1ZsA0tw9nwMM2Rev 9taM4qFAxiD+vJDOoEoO86TAumnz73bnq9AIaQMUwJNICd/7nn+zKlSowdZq9XZx8/ QVdSGPkvZwRms750zEBPau6An4kG5l20obzx/7RsXE6TskiZ2s8HXYiOVHrt4x2FLZ Ctxl/cPkRGm3Q== Received: by pali.im (Postfix) id 5626C1D34; Mon, 25 Jul 2022 14:10:16 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: Marek Behun , u-boot@lists.denx.de Subject: [PATCH 2/6] arm64: a37xx: pinctrl: Remove duplicate info->groups and info->ngroups fields Date: Mon, 25 Jul 2022 14:08:59 +0200 Message-Id: <20220725120903.3284-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220725120903.3284-1-pali@kernel.org> References: <20220725120903.3284-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean They are available in pin_data structure. Signed-off-by: Pali Rohár --- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index 610535fa2392..e1cde53a0243 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -95,8 +95,6 @@ struct armada_37xx_pinctrl { const struct armada_37xx_pin_data *data; struct udevice *dev; struct pinctrl_dev *pctl_dev; - struct armada_37xx_pin_group *groups; - unsigned int ngroups; struct armada_37xx_pmx_func *funcs; unsigned int nfuncs; }; @@ -235,7 +233,7 @@ static int armada_37xx_pmx_get_groups_count(struct udevice *dev) { struct armada_37xx_pinctrl *info = dev_get_priv(dev); - return info->ngroups; + return info->data->ngroups; } static const char *armada_37xx_pmx_dummy_name = "_dummy"; @@ -245,10 +243,10 @@ static const char *armada_37xx_pmx_get_group_name(struct udevice *dev, { struct armada_37xx_pinctrl *info = dev_get_priv(dev); - if (!info->groups[selector].name) + if (!info->data->groups[selector].name) return armada_37xx_pmx_dummy_name; - return info->groups[selector].name; + return info->data->groups[selector].name; } static int armada_37xx_pmx_get_funcs_count(struct udevice *dev) @@ -295,7 +293,7 @@ static int armada_37xx_pmx_group_set(struct udevice *dev, unsigned func_selector) { struct armada_37xx_pinctrl *info = dev_get_priv(dev); - struct armada_37xx_pin_group *grp = &info->groups[group_selector]; + struct armada_37xx_pin_group *grp = &info->data->groups[group_selector]; const char *name = info->funcs[func_selector].name; return armada_37xx_pmx_set_by_name(dev, name, grp); @@ -350,8 +348,8 @@ static int armada_37xx_fill_group(struct armada_37xx_pinctrl *info) { int n, num = 0, funcsize = info->data->nr_pins; - for (n = 0; n < info->ngroups; n++) { - struct armada_37xx_pin_group *grp = &info->groups[n]; + for (n = 0; n < info->data->ngroups; n++) { + struct armada_37xx_pin_group *grp = &info->data->groups[n]; int f; for (f = 0; (f < NB_FUNCS) && grp->funcs[f]; f++) { @@ -402,8 +400,8 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info) groups = funcs[n].groups; - for (g = 0; g < info->ngroups; g++) { - struct armada_37xx_pin_group *gp = &info->groups[g]; + for (g = 0; g < info->data->ngroups; g++) { + struct armada_37xx_pin_group *gp = &info->data->groups[g]; int f; for (f = 0; (f < NB_FUNCS) && gp->funcs[f]; f++) { @@ -584,9 +582,6 @@ int armada_37xx_pinctrl_probe(struct udevice *dev) return -ENODEV; } - info->groups = pin_data->groups; - info->ngroups = pin_data->ngroups; - /* * we allocate functions for number of pins and hope there are * fewer unique functions than pins available -- 2.20.1