From 399a15e469339d04cfc4c704d85d62640c435be8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Sat, 29 Dec 2012 14:37:44 +0800 Subject: [PATCH] gpio: rk30: simplify rk30_gpiolib_request --- drivers/gpio/gpio-rk30.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-rk30.c b/drivers/gpio/gpio-rk30.c index 3bf56c5df84f..b11d3f3ff7ba 100755 --- a/drivers/gpio/gpio-rk30.c +++ b/drivers/gpio/gpio-rk30.c @@ -303,13 +303,10 @@ static int rk30_gpiolib_direction_input(struct gpio_chip *chip,unsigned offset) spin_unlock_irqrestore(&bank->lock, flags); return 0; } + static int rk30_gpiolib_request(struct gpio_chip *chip, unsigned offset) { - struct rk30_gpio_bank *bank = to_rk30_gpio_bank(chip); - int gpio = offset + PIN_BASE + bank->id * 32; - - iomux_set_gpio_mode(gpio); - + iomux_set_gpio_mode(chip->base + offset); return 0; } -- 2.34.1