RE: [PATCH 20/20] pinctrl: Enhance mapping table to support pinconfig operations
From: Stephen Warren
Date: Thu Feb 23 2012 - 16:13:33 EST
Linus Walleij wrote at Wednesday, February 22, 2012 11:09 PM:
> On Mon, Feb 20, 2012 at 7:46 AM, Stephen Warren <swarren@xxxxxxxxxx> wrote:
> > The pinctrl mapping table can now contain entries to:
> > * Set the mux function of a pin group
> > * Apply a set of pin config options to a pin or a group
> >
> > This allows pinctrl_select_state() to apply pin configs settings as well
> > as mux settings.
> >
> > Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
...
> > /* First sanity check the new mapping */
> > for (i = 0; i < num_maps; i++) {
> > + if (!maps[i].dev_name) {
> > + pr_err("failed to register map %s (%d): no device given\n",
> > + maps[i].name, i);
> > + return -EINVAL;
> > + }
> > +
>
> Hm should this not be done earlier in the patch series?
This patch isn't adding that check, it's just moving it a little earlier
in the same block.
The old code checked everything required for "MUX_GROUP" type mapping
table entries, but in the new code not all those same checks exist for
every type of mapping entry. I just moved all the common stuff to the
top of the block in one common place, followed by the stuff that varies.
So, I think that chunk is OK.
--
nvpublic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/