diff options
author | Jingoo Han <jg1.han@samsung.com> | 2012-01-26 19:32:34 +0900 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-01-28 20:50:11 +0000 |
commit | f8bd493456c3da372ae81ed8f6b903f6207b9d98 (patch) | |
tree | 2f81cc7fa93df9025eb281ee9c2843d09b5201e6 /drivers/video/bf537-lq035.c | |
parent | 1c16697bf9d5b206cb0d2b905a54de5e077296be (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.c | 12 |
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) } #if (defined(UD) && defined(LBR)) - if (gpio_request(UD, KBUILD_MODNAME)) { + if (gpio_request_one(UD, GPIOF_OUT_INIT_LOW, KBUILD_MODNAME)) { pr_err("requesting GPIO %d failed\n", UD); return -EBUSY; } - if (gpio_request(LBR, KBUILD_MODNAME)) { + if (gpio_request_one(LBR, GPIOF_OUT_INIT_HIGH, KBUILD_MODNAME)) { pr_err("requesting GPIO %d failed\n", LBR); gpio_free(UD); return -EBUSY; } - - gpio_direction_output(UD, 0); - gpio_direction_output(LBR, 1); - #endif - if (gpio_request(MOD, KBUILD_MODNAME)) { + if (gpio_request_one(MOD, GPIOF_OUT_INIT_HIGH, KBUILD_MODNAME)) { pr_err("requesting GPIO %d failed\n", MOD); #if (defined(UD) && defined(LBR)) gpio_free(LBR); @@ -408,8 +404,6 @@ static int __devinit request_ports(void) return -EBUSY; } - gpio_direction_output(MOD, 1); - SSYNC(); return 0; } |