From 07ceaac25993964057cc9ed35060a35d6795d090 Mon Sep 17 00:00:00 2001 From: Donghwa Lee Date: Thu, 26 Aug 2010 09:28:16 +0900 Subject: [PATCH] s5pc210: universal: code cleanup for check_keypad() --- board/samsung/universal_c210/universal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index 4298e53..5988c2c 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -228,13 +228,12 @@ static void check_keypad(void) { unsigned int val = 0; unsigned int power_key, auto_download = 0; - unsigned int base = S5PC210_GPIO_PART2_BASE; - val = (~readl(&gpio2->x2.dat) & (1 << 1)); + val = ~(gpio_get_value(&gpio2->x2, 1)); power_key = power_key_check(); - if (power_key && (val && 0x2)) + if (power_key && (val & 0x1)) auto_download = 1; if (auto_download) -- 2.7.4