pinctrl/lantiq: only probe available pad controllers
authorJohn Crispin <blogic@openwrt.org>
Fri, 1 Feb 2013 12:05:00 +0000 (13:05 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 5 Feb 2013 15:17:24 +0000 (16:17 +0100)
The template falcon.dtsi lists all 6 pad controllers that
can be loaded. Only probe those that have status = "okay";
inside the dts file.

Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-falcon.c

index 8ed20e84cb0274f486264c8d00e1d5ff5c86edee..6331c5c25dbb891ab7fe962f55f26f31274f8bac 100644 (file)
@@ -398,6 +398,9 @@ static int pinctrl_falcon_probe(struct platform_device *pdev)
                u32 avail;
                int pins;
 
+               if (!of_device_is_available(np))
+                       continue;
+
                if (!ppdev) {
                        dev_err(&pdev->dev, "failed to find pad pdev\n");
                        continue;