diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2011-05-03 11:22:09 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-05-12 05:52:06 -0400 |
commit | bc593f5d787d0a015539e21868302fb44a47c3e3 (patch) | |
tree | 75feac78712ae08e38b678c0dae62cb75765ddb0 /arch/arm/mach-omap2/board-zoom-debugboard.c | |
parent | 9e18630b689d658d65bf59508bfec084f61ff5c6 (diff) |
arm: omap2plus: GPIO cleanup
use gpio_request_<one|array>() instead of multiple gpiolib calls,
remove unneeded variables, etc.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-debugboard.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-debugboard.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index 2ee9ab92e0c1..6402e781c458 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -77,12 +77,9 @@ static inline void __init zoom_init_quaduart(void) | |||
77 | 77 | ||
78 | quart_gpio = ZOOM_QUADUART_GPIO; | 78 | quart_gpio = ZOOM_QUADUART_GPIO; |
79 | 79 | ||
80 | if (gpio_request(quart_gpio, "TL16CP754C GPIO") < 0) { | 80 | if (gpio_request_one(quart_gpio, GPIOF_IN, "TL16CP754C GPIO") < 0) |
81 | printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n", | 81 | printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n", |
82 | quart_gpio); | 82 | quart_gpio); |
83 | return; | ||
84 | } | ||
85 | gpio_direction_input(quart_gpio); | ||
86 | } | 83 | } |
87 | 84 | ||
88 | static inline int omap_zoom_debugboard_detect(void) | 85 | static inline int omap_zoom_debugboard_detect(void) |
@@ -92,12 +89,12 @@ static inline int omap_zoom_debugboard_detect(void) | |||
92 | 89 | ||
93 | debug_board_detect = ZOOM_SMSC911X_GPIO; | 90 | debug_board_detect = ZOOM_SMSC911X_GPIO; |
94 | 91 | ||
95 | if (gpio_request(debug_board_detect, "Zoom debug board detect") < 0) { | 92 | if (gpio_request_one(debug_board_detect, GPIOF_IN, |
93 | "Zoom debug board detect") < 0) { | ||
96 | printk(KERN_ERR "Failed to request GPIO%d for Zoom debug" | 94 | printk(KERN_ERR "Failed to request GPIO%d for Zoom debug" |
97 | "board detect\n", debug_board_detect); | 95 | "board detect\n", debug_board_detect); |
98 | return 0; | 96 | return 0; |
99 | } | 97 | } |
100 | gpio_direction_input(debug_board_detect); | ||
101 | 98 | ||
102 | if (!gpio_get_value(debug_board_detect)) { | 99 | if (!gpio_get_value(debug_board_detect)) { |
103 | ret = 0; | 100 | ret = 0; |