diff mbox series

[v1,13/17] pinctrl: keembay: Convert to use grp member

Message ID 20231122164040.2262742-14-andriy.shevchenko@linux.intel.com
State New
Headers show
Series pinctrl: Convert struct group_desc to use struct pingroup | expand

Commit Message

Andy Shevchenko Nov. 22, 2023, 4:35 p.m. UTC
Convert drivers to use grp member embedded in struct group_desc.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/pinctrl-keembay.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-keembay.c b/drivers/pinctrl/pinctrl-keembay.c
index 152c35bce8ec..ace61f8e8936 100644
--- a/drivers/pinctrl/pinctrl-keembay.c
+++ b/drivers/pinctrl/pinctrl-keembay.c
@@ -945,7 +945,7 @@  static int keembay_set_mux(struct pinctrl_dev *pctldev, unsigned int fun_sel,
 		return -EINVAL;
 
 	/* Change modes for pins in the selected group */
-	pin = *grp->pins;
+	pin = *grp->grp.pins;
 	pin_mode = *(u8 *)(func->data);
 
 	val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin);
@@ -1528,12 +1528,11 @@  static int keembay_build_groups(struct keembay_pinctrl *kpc)
 	/* Each pin is categorised as one group */
 	for (i = 0; i < kpc->ngroups; i++) {
 		const struct pinctrl_pin_desc *pdesc = keembay_pins + i;
-		struct group_desc *kmb_grp = grp + i;
+		struct pingroup *pgrp = &grp[i].grp;
 
-		kmb_grp->name = pdesc->name;
-		kmb_grp->pins = (int *)&pdesc->number;
-		pinctrl_generic_add_group(kpc->pctrl, kmb_grp->name,
-					  kmb_grp->pins, 1, NULL);
+		pgrp->name = pdesc->name;
+		pgrp->pins = (int *)&pdesc->number;
+		pinctrl_generic_add_group(kpc->pctrl, pgrp->name, pgrp->pins, 1, NULL);
 	}
 
 	return 0;