aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/bf537-lq035.c
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/bf537-lq035.c
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/bf537-lq035.c')
-rw-r--r--drivers/video/bf537-lq035.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/video/bf537-lq035.c b/drivers/video/bf537-lq035.c
index bea53c1a4950..befbc80d11fc 100644
--- a/drivers/video/bf537-lq035.c
+++ b/drivers/video/bf537-lq035.c
@@ -383,23 +383,19 @@ static int __devinit request_ports(void)
383 } 383 }
384 384
385#if (defined(UD) && defined(LBR)) 385#if (defined(UD) && defined(LBR))
386 if (gpio_request(UD, KBUILD_MODNAME)) { 386 if (gpio_request_one(UD, GPIOF_OUT_INIT_LOW, KBUILD_MODNAME)) {
387 pr_err("requesting GPIO %d failed\n", UD); 387 pr_err("requesting GPIO %d failed\n", UD);
388 return -EBUSY; 388 return -EBUSY;
389 } 389 }
390 390
391 if (gpio_request(LBR, KBUILD_MODNAME)) { 391 if (gpio_request_one(LBR, GPIOF_OUT_INIT_HIGH, KBUILD_MODNAME)) {
392 pr_err("requesting GPIO %d failed\n", LBR); 392 pr_err("requesting GPIO %d failed\n", LBR);
393 gpio_free(UD); 393 gpio_free(UD);
394 return -EBUSY; 394 return -EBUSY;
395 } 395 }
396
397 gpio_direction_output(UD, 0);
398 gpio_direction_output(LBR, 1);
399
400#endif 396#endif
401 397
402 if (gpio_request(MOD, KBUILD_MODNAME)) { 398 if (gpio_request_one(MOD, GPIOF_OUT_INIT_HIGH, KBUILD_MODNAME)) {
403 pr_err("requesting GPIO %d failed\n", MOD); 399 pr_err("requesting GPIO %d failed\n", MOD);
404#if (defined(UD) && defined(LBR)) 400#if (defined(UD) && defined(LBR))
405 gpio_free(LBR); 401 gpio_free(LBR);
@@ -408,8 +404,6 @@ static int __devinit request_ports(void)
408 return -EBUSY; 404 return -EBUSY;
409 } 405 }
410 406
411 gpio_direction_output(MOD, 1);
412
413 SSYNC(); 407 SSYNC();
414 return 0; 408 return 0;
415} 409}