diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2012-07-17 02:23:11 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2012-07-17 02:23:11 -0400 |
| commit | e3e79454a7c81a5e48c6d6b31068b12936e7d780 (patch) | |
| tree | eaa8ec6eef0f4cc6ef15aba7bfcac5e0d7d7fd91 /drivers/sh/pfc | |
| parent | 1acbbb4ed846ec6a546834c86a3bd4a5bad4ee4d (diff) | |
sh: pfc: Ignore pinmux GPIOs with invalid enum IDs.
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 <lethal@linux-sh.org>
Diffstat (limited to 'drivers/sh/pfc')
| -rw-r--r-- | drivers/sh/pfc/pinctrl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c index 4eaf24b36a81..e79e379917fc 100644 --- a/drivers/sh/pfc/pinctrl.c +++ b/drivers/sh/pfc/pinctrl.c | |||
| @@ -338,6 +338,10 @@ static int __devinit sh_pfc_map_gpios(struct sh_pfc *pfc, | |||
| 338 | pin->number = pfc->first_gpio + i; | 338 | pin->number = pfc->first_gpio + i; |
| 339 | pin->name = gpio->name; | 339 | pin->name = gpio->name; |
| 340 | 340 | ||
| 341 | /* XXX */ | ||
| 342 | if (unlikely(!gpio->enum_id)) | ||
| 343 | continue; | ||
| 344 | |||
| 341 | sh_pfc_map_one_gpio(pfc, pmx, gpio, i); | 345 | sh_pfc_map_one_gpio(pfc, pmx, gpio, i); |
| 342 | } | 346 | } |
| 343 | 347 | ||
