[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240528194951.1489887-8-andy.shevchenko@gmail.com>
Date: Tue, 28 May 2024 22:44:58 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
Daniel Golle <daniel@...rotopia.org>,
linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
linux-mips@...r.kernel.org
Cc: Dong Aisheng <aisheng.dong@....com>,
Fabio Estevam <festevam@...il.com>,
Shawn Guo <shawnguo@...nel.org>,
Jacky Bai <ping.bai@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
Sean Wang <sean.wang@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Paul Cercueil <paul@...pouillou.net>,
Lakshmi Sowjanya D <lakshmi.sowjanya.d@...el.com>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH v2 07/11] pinctrl: imx: Convert to use func member
Convert drivers to use func member embedded in struct function_desc,
because other members will be removed to avoid duplication and
desynchronisation of the generic pin function description.
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
---
drivers/pinctrl/freescale/pinctrl-imx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 2d3d80921c0d..44921e3bdb94 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -266,7 +266,7 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
npins = grp->grp.npins;
dev_dbg(ipctl->dev, "enable function %s group %s\n",
- func->name, grp->grp.name);
+ func->func.name, grp->grp.name);
for (i = 0; i < npins; i++) {
/*
@@ -593,21 +593,21 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
return -EINVAL;
/* Initialise function */
- func->name = np->name;
- func->num_group_names = of_get_child_count(np);
- if (func->num_group_names == 0) {
+ func->func.name = np->name;
+ func->func.ngroups = of_get_child_count(np);
+ if (func->func.ngroups == 0) {
dev_info(ipctl->dev, "no groups defined in %pOF\n", np);
return -EINVAL;
}
- group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
- sizeof(char *), GFP_KERNEL);
+ group_names = devm_kcalloc(ipctl->dev, func->ngroups, sizeof(*func->func.groups),
+ GFP_KERNEL);
if (!group_names)
return -ENOMEM;
i = 0;
for_each_child_of_node(np, child)
group_names[i++] = child->name;
- func->group_names = group_names;
+ func->func.groups = group_names;
i = 0;
for_each_child_of_node(np, child) {
--
2.45.1
Powered by blists - more mailing lists