summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenjian <chenjian@allwinnertech.com>2012-11-05 15:04:10 +0400
committerchenjian <chenjian@allwinnertech.com>2012-11-05 15:05:00 +0400
commite017203eb581effcc67495ec57966fddb003c85d (patch)
tree63c74cfd0dfae825720be7c424b1eca297645c22
parent7b020b841efc6da72eca658b84637b85a2fc1862 (diff)
downloadlinux-sunxi-e017203eb581effcc67495ec57966fddb003c85d.tar.xz
fix bug : usb controller only used by wifi not openexdroid4.1.1_r1-a13-v0.4releaselichee/a1x-stablelichee/a1x-release
-rwxr-xr-xdrivers/usb/host/sw_hci_sun5i.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/host/sw_hci_sun5i.c b/drivers/usb/host/sw_hci_sun5i.c
index 2de6048d98b9..94d1cefedd3e 100755
--- a/drivers/usb/host/sw_hci_sun5i.c
+++ b/drivers/usb/host/sw_hci_sun5i.c
@@ -1390,7 +1390,8 @@ static int __init sw_hci_sun5i_init(void)
if(sw_ehci0.used){
if(sw_ehci0.usb_controller_type != SW_USB_OHCI){
#ifdef CONFIG_USB_PORT_POWER_MANAGEMENT
- usb1_set_vbus_cnt--;
+ if(sw_ehci0.host_init_state)
+ usb1_set_vbus_cnt--;
#endif
platform_device_register(&sw_usb_ehci_device[0]);
}
@@ -1403,7 +1404,8 @@ static int __init sw_hci_sun5i_init(void)
if(sw_ohci0.used){
if(sw_ohci0.usb_controller_type != SW_USB_EHCI){
#ifdef CONFIG_USB_PORT_POWER_MANAGEMENT
- usb1_set_vbus_cnt--;
+ if(sw_ohci0.host_init_state)
+ usb1_set_vbus_cnt--;
#endif
platform_device_register(&sw_usb_ohci_device[0]);
}
@@ -1415,7 +1417,8 @@ static int __init sw_hci_sun5i_init(void)
#ifdef CONFIG_USB_SW_SUN5I_EHCI1
if(sw_ehci1.used){
#ifdef CONFIG_USB_PORT_POWER_MANAGEMENT
- usb2_set_vbus_cnt--;
+ if(sw_ehci1.host_init_state)
+ usb2_set_vbus_cnt--;
#endif
platform_device_register(&sw_usb_ehci_device[1]);
}else{
@@ -1426,7 +1429,8 @@ static int __init sw_hci_sun5i_init(void)
#ifdef CONFIG_USB_SW_SUN5I_OHCI1
if(sw_ohci1.used){
#ifdef CONFIG_USB_PORT_POWER_MANAGEMENT
- usb2_set_vbus_cnt--;
+ if(sw_ohci1.host_init_state)
+ usb2_set_vbus_cnt--;
#endif
platform_device_register(&sw_usb_ohci_device[1]);
}else{