From: yangkai Date: Thu, 30 Jun 2011 02:11:54 +0000 (+0800) Subject: fix usb online state in power_supply X-Git-Tag: firefly_0821_release~10154 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5a1072a10650eef236742a04e88d62e45ee5d9c0;p=firefly-linux-kernel-4.4.55.git fix usb online state in power_supply --- diff --git a/drivers/usb/dwc_otg/dwc_otg_driver.c b/drivers/usb/dwc_otg/dwc_otg_driver.c index 742855750262..a38c80a3ae2e 100755 --- a/drivers/usb/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/dwc_otg/dwc_otg_driver.c @@ -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 diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index b930725dd89a..934e1bcc3c68 100755 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -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;