From: 黄涛 Date: Sat, 29 Dec 2012 06:37:44 +0000 (+0800) Subject: gpio: rk30: simplify rk30_gpiolib_request X-Git-Tag: firefly_0821_release~8046 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=399a15e469339d04cfc4c704d85d62640c435be8;p=firefly-linux-kernel-4.4.55.git gpio: rk30: simplify rk30_gpiolib_request --- 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; }