lkml.org 
[lkml]   [2015]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC/PATCH] pinctrl: sh-pfc: Accept standard function, pins and groups properties
From
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


\
 
 \ /
  Last update: 2015-01-27 22:01    [W:0.161 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site