From 5a1072a10650eef236742a04e88d62e45ee5d9c0 Mon Sep 17 00:00:00 2001 From: yangkai Date: Thu, 30 Jun 2011 10:11:54 +0800 Subject: [PATCH] fix usb online state in power_supply --- drivers/usb/dwc_otg/dwc_otg_driver.c | 2 +- drivers/usb/gadget/f_mass_storage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.34.1