]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
gpio/samsung: Complain loudly if we don't know the SoC
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 17 Oct 2011 23:46:50 +0000 (08:46 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Mon, 17 Oct 2011 23:46:50 +0000 (08:46 +0900)
If we don't know the SoC type then we won't add any chips which is rather
unfortunate as neither GPIO nor pinmux APIs will work, breaking lots of
different subsystems. Logging at least provides a hint to the user as to
what's gone wrong.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
drivers/gpio/gpio-samsung.c

index 479edc3b8ea3d292e01e5de2fdc433c901fc3f97..866251852719c2723868eefd94443f362c952210 100644 (file)
@@ -2486,6 +2486,9 @@ static __init int samsung_gpiolib_init(void)
                s5p_register_gpioint_bank(IRQ_GPIO_XA, 0, IRQ_GPIO1_NR_GROUPS);
                s5p_register_gpioint_bank(IRQ_GPIO_XB, IRQ_GPIO1_NR_GROUPS, IRQ_GPIO2_NR_GROUPS);
 #endif
+       } else {
+               WARN(1, "Unknown SoC in gpio-samsung, no GPIOs added\n");
+               return -ENODEV;
        }
 
        return 0;