fix usb online state in power_supply
authoryangkai <yangkai@ubuntu-fs>
Thu, 30 Jun 2011 02:11:54 +0000 (10:11 +0800)
committeryangkai <yangkai@ubuntu-fs>
Thu, 30 Jun 2011 02:11:54 +0000 (10:11 +0800)
drivers/usb/dwc_otg/dwc_otg_driver.c
drivers/usb/gadget/f_mass_storage.c

index 74285575026243afa14338ac8a455cadf365c2c1..a38c80a3ae2e8635bbe941e242333f61d77ad142 100755 (executable)
@@ -2253,7 +2253,7 @@ static void __exit dwc_otg_driver_cleanup(void)
 #ifndef CONFIG_DWC_OTG_HOST_ONLY
     driver_remove_file(&dwc_otg_driver.driver, &driver_attr_dwc_otg_conn_en);
 #endif
-#ifdef CONFIG_DWC_OTG_DEVICE_ONLY
+#ifndef CONFIG_DWC_OTG_HOST_ONLY
     driver_remove_file(&dwc_otg_driver.driver, &driver_attr_vbus_status);
 #endif
 
index b930725dd89af2c3262bee0c00974c864e781df2..934e1bcc3c68cbfb2d768ae7af5c2405b0cdd267 100755 (executable)
@@ -2972,7 +2972,7 @@ static int usb_get_property(struct power_supply *psy,
 
        switch (psp) {
        case POWER_SUPPLY_PROP_ONLINE:
-        #ifdef CONFIG_DWC_OTG_DEVICE_ONLY
+        #ifndef CONFIG_DWC_OTG_HOST_ONLY
            val->intval = get_msc_connect_flag();
            #else
            val->intval = 0;