aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/bfin-lq035q1-fb.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/bfin-lq035q1-fb.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/bfin-lq035q1-fb.c')
-rw-r--r--drivers/video/bfin-lq035q1-fb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
index c633068372c9..86922ac84412 100644
--- a/drivers/video/bfin-lq035q1-fb.c
+++ b/drivers/video/bfin-lq035q1-fb.c
@@ -365,10 +365,10 @@ static int __devinit bfin_lq035q1_request_ports(struct platform_device *pdev,
365 * Drive PPI_FS3 Low 365 * Drive PPI_FS3 Low
366 */ 366 */
367 if (ANOMALY_05000400) { 367 if (ANOMALY_05000400) {
368 int ret = gpio_request(P_IDENT(P_PPI0_FS3), "PPI_FS3"); 368 int ret = gpio_request_one(P_IDENT(P_PPI0_FS3),
369 GPIOF_OUT_INIT_LOW, "PPI_FS3");
369 if (ret) 370 if (ret)
370 return ret; 371 return ret;
371 gpio_direction_output(P_IDENT(P_PPI0_FS3), 0);
372 } 372 }
373 373
374 if (ppi16) 374 if (ppi16)
@@ -716,14 +716,14 @@ static int __devinit bfin_lq035q1_probe(struct platform_device *pdev)
716 } 716 }
717 717
718 if (info->disp_info->use_bl) { 718 if (info->disp_info->use_bl) {
719 ret = gpio_request(info->disp_info->gpio_bl, "LQ035 Backlight"); 719 ret = gpio_request_one(info->disp_info->gpio_bl,
720 GPIOF_OUT_INIT_LOW, "LQ035 Backlight");
720 721
721 if (ret) { 722 if (ret) {
722 dev_err(&pdev->dev, "failed to request GPIO %d\n", 723 dev_err(&pdev->dev, "failed to request GPIO %d\n",
723 info->disp_info->gpio_bl); 724 info->disp_info->gpio_bl);
724 goto out9; 725 goto out9;
725 } 726 }
726 gpio_direction_output(info->disp_info->gpio_bl, 0);
727 } 727 }
728 728
729 ret = register_framebuffer(fbinfo); 729 ret = register_framebuffer(fbinfo);