From: wlf Date: Fri, 28 Mar 2014 03:26:23 +0000 (+0800) Subject: USB: Fix compile err if not set CONFIG_USB20_OTG. X-Git-Tag: firefly_0821_release~5756 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f5afa49215e9735fbf04e42f6f78fa862ece8319;p=firefly-linux-kernel-4.4.55.git USB: Fix compile err if not set CONFIG_USB20_OTG. --- diff --git a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c index 2b6266d67c92..756c5c23b0a2 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c @@ -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); diff --git a/drivers/usb/dwc_otg_310/usbdev_rk32.c b/drivers/usb/dwc_otg_310/usbdev_rk32.c index 03c740b20e20..be90b9982d29 100755 --- a/drivers/usb/dwc_otg_310/usbdev_rk32.c +++ b/drivers/usb/dwc_otg_310/usbdev_rk32.c @@ -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)