From: Grygorii Strashko Date: Thu, 21 Nov 2013 15:34:35 +0000 (+0200) Subject: gpio: davinci: get rid of DAVINCI_N_GPIO X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c21d500bdcf1cc0e8b7fd293195270cfa88bf963;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git gpio: davinci: get rid of DAVINCI_N_GPIO Since Davinci GPIO driver is moved to support gpiolib it has to use ARCH_NR_GPIOS (can be configured using CONFIG_ARCH_NR_GPIO Kconfig option) configuration instead of any mach/platform specific options. Hence, replace private DAVINCI_N_GPIO with common ARCH_NR_GPIOS. This is safe because default value for ARCH_NR_GPIOS=256 and maximum number of supported GPIOs for Davinci is DAVINCI_N_GPIO=144. More over, this is one of steps to re-use Davinci GPIO driver by other mach/platform. Signed-off-by: Grygorii Strashko Acked-by: Lad, Prabhakar Acked-by: Linus Walleij Acked-by: Santosh Shilimkar Signed-off-by: Sekhar Nori --- diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 805552c9c0ef..23c187c01659 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -160,8 +160,8 @@ static int davinci_gpio_probe(struct platform_device *pdev) return -EINVAL; } - if (WARN_ON(DAVINCI_N_GPIO < ngpio)) - ngpio = DAVINCI_N_GPIO; + if (WARN_ON(ARCH_NR_GPIOS < ngpio)) + ngpio = ARCH_NR_GPIOS; chips = devm_kzalloc(dev, ngpio * sizeof(struct davinci_gpio_controller),