summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-01-26 19:32:34 +0900
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-28 20:50:11 +0000
commitf8bd493456c3da372ae81ed8f6b903f6207b9d98 (patch)
tree2f81cc7fa93df9025eb281ee9c2843d09b5201e6 /drivers/video/omap2/displays/panel-tpo-td043mtea1.c
parent1c16697bf9d5b206cb0d2b905a54de5e077296be (diff)
downloadlinux-rt-f8bd493456c3da372ae81ed8f6b903f6207b9d98.tar.gz
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/omap2/displays/panel-tpo-td043mtea1.c')
-rw-r--r--drivers/video/omap2/displays/panel-tpo-td043mtea1.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
index e6649aa89591..880c313d6bcc 100644
--- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
@@ -408,17 +408,12 @@ static int tpo_td043_probe(struct omap_dss_device *dssdev)
}
if (gpio_is_valid(nreset_gpio)) {
- ret = gpio_request(nreset_gpio, "lcd reset");
+ ret = gpio_request_one(nreset_gpio, GPIOF_OUT_INIT_LOW,
+ "lcd reset");
if (ret < 0) {
dev_err(&dssdev->dev, "couldn't request reset GPIO\n");
goto fail_gpio_req;
}
-
- ret = gpio_direction_output(nreset_gpio, 0);
- if (ret < 0) {
- dev_err(&dssdev->dev, "couldn't set GPIO direction\n");
- goto fail_gpio_direction;
- }
}
ret = sysfs_create_group(&dssdev->dev.kobj, &tpo_td043_attr_group);
@@ -427,8 +422,6 @@ static int tpo_td043_probe(struct omap_dss_device *dssdev)
return 0;
-fail_gpio_direction:
- gpio_free(nreset_gpio);
fail_gpio_req:
regulator_put(tpo_td043->vcc_reg);
fail_regulator: