From: Ivan Date: Mon, 20 Mar 2017 11:07:07 +0000 (+0900) Subject: s5j/gpio: clean up code X-Git-Tag: 1.1_Public_Release~614^2~270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7add44d450ffd7e840bce96ce48fb8a69776f605;p=rtos%2Ftinyara.git s5j/gpio: clean up code Function open should not expose any GPIOs, so it is remained empty. Function up_gpioinitialize should not expose any GPIO, remained empty. This job will be done on board dependednt level by s5j_gpioinitialize() Change-Id: I83649092e725b0750bea05dd285d52a938a58db2 Signed-off-by: Ivan --- diff --git a/os/arch/arm/src/s5j/s5j_gpio.c b/os/arch/arm/src/s5j/s5j_gpio.c index 3344a0f..bbb3dab 100644 --- a/os/arch/arm/src/s5j/s5j_gpio.c +++ b/os/arch/arm/src/s5j/s5j_gpio.c @@ -227,8 +227,6 @@ static struct gpio_bank s5jt200_gpio_bank[] = { }; #endif -bool isinit = 0; - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -608,10 +606,6 @@ static const char *gpio_bank_name(int gpio) ****************************************************************************/ static int s5j_gpio_open(FAR struct gpio_dev_s *dev) { - int idx = ((struct s5j_gpio_priv *)(dev->priv))->idx; - if (!isinit) { - up_create_gpio(idx); - } return OK; } @@ -1764,7 +1758,8 @@ int up_create_gpio(int32_t idx) * Name: up_gpioinitialize * * Description: - * Init all available GPIO, exposing them to file system: dev/gpioXX + * Dummy function. Real function s5j_gpioinitialize, where GPIOs are exposed, + * called from board_init(). * * Input Parameters: * None @@ -1775,12 +1770,7 @@ int up_create_gpio(int32_t idx) ****************************************************************************/ void up_gpioinitialize(void) { - int i; - for (i = 0; i < NUM_GPIO; i++) { - up_create_gpio(i); - } - isinit = OK; } /****************************************************************************