s5pc210: universal: code cleanup for check_keypad()
authorDonghwa Lee <dh09.lee@samsung.com>
Thu, 26 Aug 2010 00:28:16 +0000 (09:28 +0900)
committerDonghwa Lee <dh09.lee@samsung.com>
Thu, 26 Aug 2010 00:28:16 +0000 (09:28 +0900)
board/samsung/universal_c210/universal.c

index 4298e53..5988c2c 100644 (file)
@@ -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)