aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-igep0020.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-12-17 21:15:07 -0500
committerTony Lindgren <tony@atomide.com>2010-12-20 21:48:16 -0500
commit62d8e9e2613032c6c8397b554b5f789131bb3d60 (patch)
treee5ecd2da0702d1175e26fdc46a7c9ca02e13afa3 /arch/arm/mach-omap2/board-igep0020.c
parent65dd4c1626b396af839881708fdf3bc726a16f73 (diff)
omap3: igepv2: Don't call gpio_set_value right aftergpio_direction_output
gpio_direction_output() has a value argument, there's no need to call gpio_set_value() explicitly right after. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0020.c')
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 3bee9a1f0a2..77e2db77c6f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -377,24 +377,21 @@ static void __init igep2_leds_init(void)
377static inline void igep2_leds_init(void) 377static inline void igep2_leds_init(void)
378{ 378{
379 if ((gpio_request(IGEP2_GPIO_LED0_RED, "gpio-led:red:d0") == 0) && 379 if ((gpio_request(IGEP2_GPIO_LED0_RED, "gpio-led:red:d0") == 0) &&
380 (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) { 380 (gpio_direction_output(IGEP2_GPIO_LED0_RED, 0) == 0))
381 gpio_export(IGEP2_GPIO_LED0_RED, 0); 381 gpio_export(IGEP2_GPIO_LED0_RED, 0);
382 gpio_set_value(IGEP2_GPIO_LED0_RED, 0); 382 else
383 } else
384 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_RED\n"); 383 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_RED\n");
385 384
386 if ((gpio_request(IGEP2_GPIO_LED0_GREEN, "gpio-led:green:d0") == 0) && 385 if ((gpio_request(IGEP2_GPIO_LED0_GREEN, "gpio-led:green:d0") == 0) &&
387 (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) { 386 (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 0) == 0))
388 gpio_export(IGEP2_GPIO_LED0_GREEN, 0); 387 gpio_export(IGEP2_GPIO_LED0_GREEN, 0);
389 gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0); 388 else
390 } else
391 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n"); 389 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n");
392 390
393 if ((gpio_request(IGEP2_GPIO_LED1_RED, "gpio-led:red:d1") == 0) && 391 if ((gpio_request(IGEP2_GPIO_LED1_RED, "gpio-led:red:d1") == 0) &&
394 (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) { 392 (gpio_direction_output(IGEP2_GPIO_LED1_RED, 0) == 0))
395 gpio_export(IGEP2_GPIO_LED1_RED, 0); 393 gpio_export(IGEP2_GPIO_LED1_RED, 0);
396 gpio_set_value(IGEP2_GPIO_LED1_RED, 0); 394 else
397 } else
398 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n"); 395 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n");
399 396
400} 397}
@@ -426,10 +423,9 @@ static int igep2_twl_gpio_setup(struct device *dev,
426 /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ 423 /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
427#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) 424#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
428 if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) 425 if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0)
429 && (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) { 426 && (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 0) == 0))
430 gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0); 427 gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
431 gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0); 428 else
432 } else
433 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n"); 429 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n");
434#else 430#else
435 igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1; 431 igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;