USB: Fix compile err if not set CONFIG_USB20_OTG.
authorwlf <wulf@rock-chips.com>
Fri, 28 Mar 2014 03:26:23 +0000 (11:26 +0800)
committerwlf <wulf@rock-chips.com>
Fri, 28 Mar 2014 03:26:23 +0000 (11:26 +0800)
drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c
drivers/usb/dwc_otg_310/usbdev_rk32.c

index 2b6266d67c92ddc265de9c1f92683d3fb9323c96..756c5c23b0a2813c6d085d0f11a1ffc647b05b5f 100755 (executable)
@@ -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);
 
index 03c740b20e206e7bebea4215719f97e9fbf284b8..be90b9982d29e260f11bd244e0d9b8afd440b56a 100755 (executable)
@@ -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)