Re: [RFC/PATCH] pinctrl: sh-pfc: Accept standard function, pins and groups properties

Geert Uytterhoeven
2015-01-27T20:40:49Z

On Tue, Jan 27, 2015 at 9:31 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> + if (of_find_property(np, "groups", NULL) ||
> + of_find_property(np, "pins", NULL)) {
> + pmx->func_prop_name = "function";
> + pmx->groups_prop_name = "groups";
> + pmx->pins_prop_name = "pins";
> + } else {
> + pmx->func_prop_name = "renesas,function";
> + pmx->groups_prop_name = "renesas,groups";
> + pmx->pins_prop_name = "renesas,pins";
> + }

Do we want to be clever and save memory?

pmx->func_prop_name = "renesas,function";
pmx->groups_prop_name = "renesas,groups";
pmx->pins_prop_name = "renesas,pins";
if (of_find_property(np, "groups", NULL) ||
of_find_property(np, "pins", NULL)) {
pmx->func_prop_name += strlen("renesas,");
pmx->groups_prop_name += strlen("renesas,");
pmx->pins_prop_name += strlen("renesas,");
}

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds