]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
sh: pfc: Ignore pinmux GPIOs with invalid enum IDs.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 17 Jul 2012 06:23:11 +0000 (15:23 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 17 Jul 2012 06:23:11 +0000 (15:23 +0900)
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>
drivers/sh/pfc/pinctrl.c

index 4eaf24b36a812b7c763d6b3e3af1a5424eb0439a..e79e379917fcb8cb68da834b76a7f71f8e7d2980 100644 (file)
@@ -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);
        }