]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: 7903/1: sa1100: h3xxx: drop hand-coded gpio_request_array analogue
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Tue, 26 Nov 2013 10:11:21 +0000 (11:11 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 12 Feb 2014 10:36:04 +0000 (10:36 +0000)
h3xxx_init_gpio() behaves alsmost like gpio_request_array. Also after
all GPIO refactoring it is unused. Drop it now.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-sa1100/h3xxx.c
arch/arm/mach-sa1100/include/mach/h3xxx.h

index 82e87024b1a6bfa460dbc52d7f10a0c1810ecf9f..c79bf467fb7f8efea5b70f7e2d278e3f30c52864 100644 (file)
 
 #include "generic.h"
 
-void h3xxx_init_gpio(struct gpio_default_state *s, size_t n)
-{
-       while (n--) {
-               const char *name = s->name;
-               int err;
-
-               if (!name)
-                       name = "[init]";
-               err = gpio_request(s->gpio, name);
-               if (err) {
-                       printk(KERN_ERR "gpio%u: unable to request: %d\n",
-                               s->gpio, err);
-                       continue;
-               }
-               if (s->mode >= 0) {
-                       err = gpio_direction_output(s->gpio, s->mode);
-               } else {
-                       err = gpio_direction_input(s->gpio);
-               }
-               if (err) {
-                       printk(KERN_ERR "gpio%u: unable to set direction: %d\n",
-                               s->gpio, err);
-                       continue;
-               }
-               if (!s->name)
-                       gpio_free(s->gpio);
-               s++;
-       }
-}
-
-
 /*
  * H3xxx flash support
  */
index c810620db53d60235916e8ecf25c6402f2b984b1..603d4343f7f678d5b11ca8a0bedbafd6737b9f0b 100644 (file)
 #define H3600_EGPIO_LCD_5V_ON          (H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */
 #define H3600_EGPIO_LVDD_ON            (H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */
 
-struct gpio_default_state {
-       int gpio;
-       int mode;
-       const char *name;
-};
-
-#define GPIO_MODE_IN   -1
-#define GPIO_MODE_OUT0 0
-#define GPIO_MODE_OUT1 1
-
-void h3xxx_init_gpio(struct gpio_default_state *s, size_t n);
 void __init h3xxx_map_io(void);
 void __init h3xxx_mach_init(void);