Skip to content

Commit db4a913

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: core: Remove unused members from struct group_desc
All drivers are converted to use embedded struct pingroup. Remove unused members from struct group_desc. Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent fcbcfe5 commit db4a913

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

drivers/pinctrl/core.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,6 @@ const char *pinctrl_generic_get_group_name(struct pinctrl_dev *pctldev,
557557
if (!group)
558558
return NULL;
559559

560-
if (group->name)
561-
return group->name;
562-
563560
return group->grp.name;
564561
}
565562
EXPORT_SYMBOL_GPL(pinctrl_generic_get_group_name);
@@ -586,12 +583,6 @@ int pinctrl_generic_get_group_pins(struct pinctrl_dev *pctldev,
586583
return -EINVAL;
587584
}
588585

589-
if (group->pins) {
590-
*pins = group->pins;
591-
*num_pins = group->num_pins;
592-
return 0;
593-
}
594-
595586
*pins = group->grp.pins;
596587
*num_pins = group->grp.npins;
597588

drivers/pinctrl/core.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,26 +199,17 @@ struct pinctrl_maps {
199199
/**
200200
* struct group_desc - generic pin group descriptor
201201
* @grp: generic data of the pin group (name and pins)
202-
* @name: name of the pin group
203-
* @pins: array of pins that belong to the group
204-
* @num_pins: number of pins in the group
205202
* @data: pin controller driver specific data
206203
*/
207204
struct group_desc {
208205
struct pingroup grp;
209-
const char *name;
210-
const unsigned int *pins;
211-
int num_pins;
212206
void *data;
213207
};
214208

215209
/* Convenience macro to define a generic pin group descriptor */
216210
#define PINCTRL_GROUP_DESC(_name, _pins, _num_pins, _data) \
217211
(struct group_desc) { \
218212
.grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
219-
.name = _name, \
220-
.pins = _pins, \
221-
.num_pins = _num_pins, \
222213
.data = _data, \
223214
}
224215

0 commit comments

Comments
 (0)