From 4603089d7c5186d255c4718171187d00ee4d3452 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Wed, 24 Nov 2010 10:59:57 +0900 Subject: [PATCH] ARM: SAMSUNG: Cleanup GPIOlib adding 2bit chips This patch adds samsung_gpiolib_add_2bit_chips() for cleanup regarding GPIOlib adding 2bit chips. Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/gpiolib.c | 7 +++++++ arch/arm/plat-samsung/include/plat/gpio-core.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/arch/arm/plat-samsung/gpiolib.c b/arch/arm/plat-samsung/gpiolib.c index c354089254fc..ea37c0461788 100644 --- a/arch/arm/plat-samsung/gpiolib.c +++ b/arch/arm/plat-samsung/gpiolib.c @@ -197,3 +197,10 @@ void __init samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip, s3c_gpiolib_add(chip); } } + +void __init samsung_gpiolib_add_2bit_chips(struct s3c_gpio_chip *chip, + int nr_chips) +{ + for (; nr_chips > 0; nr_chips--, chip++) + s3c_gpiolib_add(chip); +} diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index 13a22b8861ef..dac35d0a711d 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h @@ -118,6 +118,8 @@ extern void samsung_gpiolib_add_4bit_chips(struct s3c_gpio_chip *chip, int nr_chips); extern void samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip, int nr_chips); +extern void samsung_gpiolib_add_2bit_chips(struct s3c_gpio_chip *chip, + int nr_chips); extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); -- 2.20.1