summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/mach-smdkv210.c
diff options
context:
space:
mode:
authorJingoo Han2011-12-24 03:57:09 +0100
committerKukjin Kim2011-12-24 03:57:15 +0100
commit2f4f0b42193322987c534c928e3555e3936090e1 (patch)
tree0eb599cec62a171e83521a85ccb1087a0a096162 /arch/arm/mach-s5pv210/mach-smdkv210.c
parentARM: SAMSUNG: Use kmemdup rather than duplicating its implementation (diff)
downloadkernel-qcow2-linux-2f4f0b42193322987c534c928e3555e3936090e1.tar.gz
kernel-qcow2-linux-2f4f0b42193322987c534c928e3555e3936090e1.tar.xz
kernel-qcow2-linux-2f4f0b42193322987c534c928e3555e3936090e1.zip
ARM: S5PV210: Use gpio_request_one
By using gpio_request_one it is possible to set the direction and initial value in one shot. Thus, using gpio_request_one can make the code simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/mach-smdkv210.c')
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index a9106c392398..10a4ec6989c8 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -153,15 +153,12 @@ static void smdkv210_lte480wv_set_power(struct plat_lcd_data *pd,
{
if (power) {
#if !defined(CONFIG_BACKLIGHT_PWM)
- gpio_request(S5PV210_GPD0(3), "GPD0");
- gpio_direction_output(S5PV210_GPD0(3), 1);
+ gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_HIGH, "GPD0");
gpio_free(S5PV210_GPD0(3));
#endif
/* fire nRESET on power up */
- gpio_request(S5PV210_GPH0(6), "GPH0");
-
- gpio_direction_output(S5PV210_GPH0(6), 1);
+ gpio_request_one(S5PV210_GPH0(6), GPIOF_OUT_INIT_HIGH, "GPH0");
gpio_set_value(S5PV210_GPH0(6), 0);
mdelay(10);
@@ -172,8 +169,7 @@ static void smdkv210_lte480wv_set_power(struct plat_lcd_data *pd,
gpio_free(S5PV210_GPH0(6));
} else {
#if !defined(CONFIG_BACKLIGHT_PWM)
- gpio_request(S5PV210_GPD0(3), "GPD0");
- gpio_direction_output(S5PV210_GPD0(3), 0);
+ gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_LOW, "GPD0");
gpio_free(S5PV210_GPD0(3));
#endif
}