Skip to content

Commit

Permalink
sh: pfc: Ignore pinmux GPIOs with invalid enum IDs.
Browse files Browse the repository at this point in the history
If we encounter invalid entries in the pinmux GPIO range, make sure we've
still got a dummy pin definition but don't otherwise map it.

Signed-off-by: Paul Mundt <[email protected]>
  • Loading branch information
pmundt committed Jul 17, 2012
1 parent 1acbbb4 commit e3e7945
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/sh/pfc/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ static int __devinit sh_pfc_map_gpios(struct sh_pfc *pfc,
pin->number = pfc->first_gpio + i;
pin->name = gpio->name;

/* XXX */
if (unlikely(!gpio->enum_id))
continue;

sh_pfc_map_one_gpio(pfc, pmx, gpio, i);
}

Expand Down

0 comments on commit e3e7945

Please sign in to comment.