gta02: use a dedicated function to query usb online status
authorPaul Fertser <fercerpav@gmail.com>
Wed, 29 Jul 2009 19:56:48 +0000 (23:56 +0400)
committerPaul Fertser <fercerpav@gmail.com>
Sun, 2 Aug 2009 07:27:40 +0000 (11:27 +0400)
We need to use a dedicated function because we can't get charger
status from an irq context and that is required by usb gadgets.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
arch/arm/mach-s3c2442/mach-gta02.c

index d70c3e6..cb272fd 100644 (file)
@@ -391,7 +391,7 @@ static int gta02_get_charger_online_status(void)
 {
        struct pcf50633 *pcf = gta02_pcf;
 
-       return pcf50633_mbc_get_status(pcf) & PCF50633_MBC_USB_ONLINE;
+       return pcf50633_mbc_get_usb_online_status(pcf);
 }
 
 static int gta02_get_charger_active_status(void)
@@ -484,7 +484,7 @@ static int gta02_udc_vbus_status(void)
         if (!gta02_pcf)
                return -ENODEV;
 
-       return !!(pcf50633_mbc_get_status(pcf) & PCF50633_MBC_USB_ONLINE);
+       return pcf50633_mbc_get_usb_online_status(pcf);
 }
 #else /* !CONFIG_CHARGER_PCF50633 */
 #define gta02_get_charger_online_status NULL