@@ -42,7 +42,7 @@ static inline const struct group_desc *imx_pinctrl_find_group_by_name(
42
42
43
43
for (i = 0 ; i < pctldev -> num_groups ; i ++ ) {
44
44
grp = pinctrl_generic_get_group (pctldev , i );
45
- if (grp && !strcmp (grp -> name , name ))
45
+ if (grp && !strcmp (grp -> grp . name , name ))
46
46
break ;
47
47
}
48
48
@@ -79,9 +79,9 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev,
79
79
}
80
80
81
81
if (info -> flags & IMX_USE_SCU ) {
82
- map_num += grp -> num_pins ;
82
+ map_num += grp -> grp . npins ;
83
83
} else {
84
- for (i = 0 ; i < grp -> num_pins ; i ++ ) {
84
+ for (i = 0 ; i < grp -> grp . npins ; i ++ ) {
85
85
pin = & ((struct imx_pin * )(grp -> data ))[i ];
86
86
if (!(pin -> conf .mmio .config & IMX_NO_PAD_CTL ))
87
87
map_num ++ ;
@@ -109,7 +109,7 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev,
109
109
110
110
/* create config map */
111
111
new_map ++ ;
112
- for (i = j = 0 ; i < grp -> num_pins ; i ++ ) {
112
+ for (i = j = 0 ; i < grp -> grp . npins ; i ++ ) {
113
113
pin = & ((struct imx_pin * )(grp -> data ))[i ];
114
114
115
115
/*
@@ -263,10 +263,10 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
263
263
if (!func )
264
264
return - EINVAL ;
265
265
266
- npins = grp -> num_pins ;
266
+ npins = grp -> grp . npins ;
267
267
268
268
dev_dbg (ipctl -> dev , "enable function %s group %s\n" ,
269
- func -> name , grp -> name );
269
+ func -> name , grp -> grp . name );
270
270
271
271
for (i = 0 ; i < npins ; i ++ ) {
272
272
/*
@@ -423,7 +423,7 @@ static void imx_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
423
423
if (!grp )
424
424
return ;
425
425
426
- for (i = 0 ; i < grp -> num_pins ; i ++ ) {
426
+ for (i = 0 ; i < grp -> grp . npins ; i ++ ) {
427
427
struct imx_pin * pin = & ((struct imx_pin * )(grp -> data ))[i ];
428
428
429
429
name = pin_get_name (pctldev , pin -> pin );
@@ -526,7 +526,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
526
526
pin_size = FSL_PIN_SIZE ;
527
527
528
528
/* Initialise group */
529
- grp -> name = np -> name ;
529
+ grp -> grp . name = np -> name ;
530
530
531
531
/*
532
532
* the binding format is fsl,pins = <PIN_FUNC_ID CONFIG ...>,
@@ -554,19 +554,17 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
554
554
return - EINVAL ;
555
555
}
556
556
557
- grp -> num_pins = size / pin_size ;
558
- grp -> data = devm_kcalloc (ipctl -> dev ,
559
- grp -> num_pins , sizeof (struct imx_pin ),
560
- GFP_KERNEL );
557
+ grp -> grp .npins = size / pin_size ;
558
+ grp -> data = devm_kcalloc (ipctl -> dev , grp -> grp .npins , sizeof (* pin ), GFP_KERNEL );
561
559
if (!grp -> data )
562
560
return - ENOMEM ;
563
561
564
- pins = devm_kcalloc (ipctl -> dev , grp -> num_pins , sizeof (* pins ), GFP_KERNEL );
562
+ pins = devm_kcalloc (ipctl -> dev , grp -> grp . npins , sizeof (* pins ), GFP_KERNEL );
565
563
if (!pins )
566
564
return - ENOMEM ;
567
- grp -> pins = pins ;
565
+ grp -> grp . pins = pins ;
568
566
569
- for (i = 0 ; i < grp -> num_pins ; i ++ ) {
567
+ for (i = 0 ; i < grp -> grp . npins ; i ++ ) {
570
568
pin = & ((struct imx_pin * )(grp -> data ))[i ];
571
569
if (info -> flags & IMX_USE_SCU )
572
570
info -> imx_pinctrl_parse_pin (ipctl , & pins [i ], pin , & list );
@@ -613,8 +611,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
613
611
614
612
i = 0 ;
615
613
for_each_child_of_node (np , child ) {
616
- grp = devm_kzalloc (ipctl -> dev , sizeof (struct group_desc ),
617
- GFP_KERNEL );
614
+ grp = devm_kzalloc (ipctl -> dev , sizeof (* grp ), GFP_KERNEL );
618
615
if (!grp ) {
619
616
of_node_put (child );
620
617
return - ENOMEM ;
0 commit comments