aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/leds/leds-netxbig.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/leds/leds-netxbig.c b/drivers/leds/leds-netxbig.c
index 8c7a4ea10dc3..d8433f2d53bc 100644
--- a/drivers/leds/leds-netxbig.c
+++ b/drivers/leds/leds-netxbig.c
@@ -81,35 +81,23 @@ static int __devinit gpio_ext_init(struct netxbig_gpio_ext *gpio_ext)
81 81
82 /* Configure address GPIOs. */ 82 /* Configure address GPIOs. */
83 for (i = 0; i < gpio_ext->num_addr; i++) { 83 for (i = 0; i < gpio_ext->num_addr; i++) {
84 err = gpio_request(gpio_ext->addr[i], "GPIO extension addr"); 84 err = gpio_request_one(gpio_ext->addr[i], GPIOF_OUT_INIT_LOW,
85 "GPIO extension addr");
85 if (err) 86 if (err)
86 goto err_free_addr; 87 goto err_free_addr;
87 err = gpio_direction_output(gpio_ext->addr[i], 0);
88 if (err) {
89 gpio_free(gpio_ext->addr[i]);
90 goto err_free_addr;
91 }
92 } 88 }
93 /* Configure data GPIOs. */ 89 /* Configure data GPIOs. */
94 for (i = 0; i < gpio_ext->num_data; i++) { 90 for (i = 0; i < gpio_ext->num_data; i++) {
95 err = gpio_request(gpio_ext->data[i], "GPIO extension data"); 91 err = gpio_request_one(gpio_ext->data[i], GPIOF_OUT_INIT_LOW,
92 "GPIO extension data");
96 if (err) 93 if (err)
97 goto err_free_data; 94 goto err_free_data;
98 err = gpio_direction_output(gpio_ext->data[i], 0);
99 if (err) {
100 gpio_free(gpio_ext->data[i]);
101 goto err_free_data;
102 }
103 } 95 }
104 /* Configure "enable select" GPIO. */ 96 /* Configure "enable select" GPIO. */
105 err = gpio_request(gpio_ext->enable, "GPIO extension enable"); 97 err = gpio_request_one(gpio_ext->enable, GPIOF_OUT_INIT_LOW,
98 "GPIO extension enable");
106 if (err) 99 if (err)
107 goto err_free_data; 100 goto err_free_data;
108 err = gpio_direction_output(gpio_ext->enable, 0);
109 if (err) {
110 gpio_free(gpio_ext->enable);
111 goto err_free_data;
112 }
113 101
114 return 0; 102 return 0;
115 103