[PATCH 3/3] pinctrl: s32cc: embed generic struct pingroup and pinfunction

Andy Shevchenko andy.shevchenko at gmail.com
Tue Mar 14 10:19:10 PDT 2023


On Tue, Mar 14, 2023 at 3:47 PM Chester Lin <clin at suse.com> wrote:
>
> Use generic data structure to describe pin control functions and groups in
> S32 SoC family and drop duplicated struct members.

...

>  struct s32_pmx_func {
> -       const char *name;
> -       const char **groups;
> -       unsigned int num_groups;
> +       struct pinfunction data;
>  };

Since you have a single driver with this, just kill the entire custom
structure.

The way it's done in the pinctrl-intel.c is due to dozens of drivers
sharing the same data type and hence converting that will provoke
quite a noise for no benefit. Here it's not the case, so just kill it.

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list