aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/msm
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-01-26 05:32:34 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-28 15:50:11 -0500
commitf8bd493456c3da372ae81ed8f6b903f6207b9d98 (patch)
tree2f81cc7fa93df9025eb281ee9c2843d09b5201e6 /drivers/video/msm
parent1c16697bf9d5b206cb0d2b905a54de5e077296be (diff)
video: use gpio_request_one
Using gpio_request_one can make the code simpler because it can set the direction and initial value in one shot. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/msm')
-rw-r--r--drivers/video/msm/mddi_client_nt35399.c7
-rw-r--r--drivers/video/msm/mddi_client_toshiba.c7
2 files changed, 2 insertions, 12 deletions
diff --git a/drivers/video/msm/mddi_client_nt35399.c b/drivers/video/msm/mddi_client_nt35399.c
index f239f4a25e01..7fcd67e132bf 100644
--- a/drivers/video/msm/mddi_client_nt35399.c
+++ b/drivers/video/msm/mddi_client_nt35399.c
@@ -155,14 +155,10 @@ static int setup_vsync(struct panel_info *panel, int init)
155 ret = 0; 155 ret = 0;
156 goto uninit; 156 goto uninit;
157 } 157 }
158 ret = gpio_request(gpio, "vsync"); 158 ret = gpio_request_one(gpio, GPIOF_IN, "vsync");
159 if (ret) 159 if (ret)
160 goto err_request_gpio_failed; 160 goto err_request_gpio_failed;
161 161
162 ret = gpio_direction_input(gpio);
163 if (ret)
164 goto err_gpio_direction_input_failed;
165
166 ret = irq = gpio_to_irq(gpio); 162 ret = irq = gpio_to_irq(gpio);
167 if (ret < 0) 163 if (ret < 0)
168 goto err_get_irq_num_failed; 164 goto err_get_irq_num_failed;
@@ -180,7 +176,6 @@ uninit:
180 free_irq(gpio_to_irq(gpio), panel->client_data); 176 free_irq(gpio_to_irq(gpio), panel->client_data);
181err_request_irq_failed: 177err_request_irq_failed:
182err_get_irq_num_failed: 178err_get_irq_num_failed:
183err_gpio_direction_input_failed:
184 gpio_free(gpio); 179 gpio_free(gpio);
185err_request_gpio_failed: 180err_request_gpio_failed:
186 return ret; 181 return ret;
diff --git a/drivers/video/msm/mddi_client_toshiba.c b/drivers/video/msm/mddi_client_toshiba.c
index f9bc932ac46b..053eb6877330 100644
--- a/drivers/video/msm/mddi_client_toshiba.c
+++ b/drivers/video/msm/mddi_client_toshiba.c
@@ -186,14 +186,10 @@ static int setup_vsync(struct panel_info *panel,
186 ret = 0; 186 ret = 0;
187 goto uninit; 187 goto uninit;
188 } 188 }
189 ret = gpio_request(gpio, "vsync"); 189 ret = gpio_request_one(gpio, GPIOF_IN, "vsync");
190 if (ret) 190 if (ret)
191 goto err_request_gpio_failed; 191 goto err_request_gpio_failed;
192 192
193 ret = gpio_direction_input(gpio);
194 if (ret)
195 goto err_gpio_direction_input_failed;
196
197 ret = irq = gpio_to_irq(gpio); 193 ret = irq = gpio_to_irq(gpio);
198 if (ret < 0) 194 if (ret < 0)
199 goto err_get_irq_num_failed; 195 goto err_get_irq_num_failed;
@@ -210,7 +206,6 @@ uninit:
210 free_irq(gpio_to_irq(gpio), panel); 206 free_irq(gpio_to_irq(gpio), panel);
211err_request_irq_failed: 207err_request_irq_failed:
212err_get_irq_num_failed: 208err_get_irq_num_failed:
213err_gpio_direction_input_failed:
214 gpio_free(gpio); 209 gpio_free(gpio);
215err_request_gpio_failed: 210err_request_gpio_failed:
216 return ret; 211 return ret;