From: Axel Lin Date: Sat, 15 Jun 2013 14:19:45 +0000 (+0800) Subject: gpio: s5p_gpio: Call s5p_gpio_set_value() instead of open-code X-Git-Tag: v2013.07-rc3~4^2~6^2~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=70125f341152c3f29d5552c5490cc5eb15a0215d;p=u-boot gpio: s5p_gpio: Call s5p_gpio_set_value() instead of open-code Call s5p_gpio_set_value() to avoid code duplication. Signed-off-by: Axel Lin Signed-off-by: Minkyu Kang --- diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index 656bf4a06c..4efb768551 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -48,15 +48,8 @@ void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg) void s5p_gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en) { - unsigned int value; - s5p_gpio_cfg_pin(bank, gpio, GPIO_OUTPUT); - - value = readl(&bank->dat); - value &= ~DAT_MASK(gpio); - if (en) - value |= DAT_SET(gpio); - writel(value, &bank->dat); + s5p_gpio_set_value(bank, gpio, en); } void s5p_gpio_direction_input(struct s5p_gpio_bank *bank, int gpio)