USB: Fix compile err if not set CONFIG_USB20_OTG.

This commit is contained in:
wlf
2014-03-28 11:26:23 +08:00
parent 4b9b167a3d
commit f5afa49215
2 changed files with 6 additions and 1 deletions

View File

@@ -1614,6 +1614,7 @@ void dwc_otg_pcd_start_check_vbus_work(dwc_otg_pcd_t * pcd)
*/
int dwc_vbus_status( void )
{
#ifdef CONFIG_USB20_OTG
dwc_otg_pcd_t *pcd = 0;
pcd = gadget_wrapper->pcd;
@@ -1621,7 +1622,9 @@ int dwc_vbus_status( void )
return 0;
else
return pcd->vbus_status ;
#else
return 0;
#endif
}
EXPORT_SYMBOL(dwc_vbus_status);

View File

@@ -889,10 +889,12 @@ static int dwc_otg_control_usb_probe(struct platform_device *pdev)
}
gpio_direction_output(control_usb->otg_gpios->gpio, 0);
#ifdef CONFIG_USB20_OTG
if(usb20otg_get_status(USB_STATUS_BVABLID)){
rk_usb_charger_status = USB_BC_TYPE_SDP;
schedule_delayed_work(&control_usb->usb_charger_det_work, HZ/10);
}
#endif
ret = otg_irq_detect_init(pdev);
if (ret < 0)