USB: fix compile warnings.
authorwlf <wulf@rock-chips.com>
Thu, 12 Jun 2014 02:33:18 +0000 (10:33 +0800)
committerwlf <wulf@rock-chips.com>
Thu, 12 Jun 2014 02:33:18 +0000 (10:33 +0800)
drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c
drivers/usb/dwc_otg_310/usbdev_rk32.c
drivers/usb/gadget/f_mass_storage.c

index 4459547e82eb7a5470b4f2618e08166623bb0d7d..8d47342f12a253ffaa495a9ca49c90d8a7cc507d 100755 (executable)
@@ -1646,9 +1646,11 @@ static void dwc_otg_pcd_work_init(dwc_otg_pcd_t *pcd,
 {
 
        struct dwc_otg_device *otg_dev = pcd->otg_dev;
-       struct dwc_otg_platform_data *pldata = otg_dev->pldata;
        pcd->vbus_status = USB_BC_TYPE_DISCNT;
        pcd->phy_suspend = USB_PHY_ENABLED;
+#ifdef CONFIG_RK_USB_UART
+       struct dwc_otg_platform_data *pldata = otg_dev->pldata;
+#endif
 
        INIT_DELAYED_WORK(&pcd->reconnect, dwc_phy_reconnect);
        INIT_DELAYED_WORK(&pcd->check_vbus_work, dwc_otg_pcd_check_vbus_work);
index 426ba0673e7e7de058aa36450f8b99ea7c3c392c..d1a9406fe3f910acfa3935c600da1476b0a3e38c 100755 (executable)
@@ -684,7 +684,8 @@ static irqreturn_t id_irq_handler(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-/***** handler for otg line status change *****/
+#ifdef USB_LINESTATE_IRQ
+/***** handler for usb line status change *****/
 
 static irqreturn_t line_irq_handler(int irq, void *dev_id)
 {
@@ -708,6 +709,7 @@ static irqreturn_t line_irq_handler(int irq, void *dev_id)
 
        return IRQ_HANDLED;
 }
+#endif
 
 /************* register usb detection irqs **************/
 static int otg_irq_detect_init(struct platform_device *pdev)
@@ -750,7 +752,7 @@ static int otg_irq_detect_init(struct platform_device *pdev)
                                enable_irq_wake(irq);
                }
        }
-#if 0
+#ifdef USB_LINESTATE_IRQ
        /*register otg_linestate irq */
        irq = platform_get_irq_byname(pdev, "otg_linestate");
        if (irq > 0) {
index f39c0330a277839be938b6691785520e931297de..4bcca7cee4d9086db16509de0a100a22544c6a9d 100755 (executable)
@@ -1067,7 +1067,7 @@ static int do_synchronize_cache(struct fsg_common *common)
 }
 
 /*-------------------------------------------------------------------------*/
-
+#ifndef CONFIG_ARCH_ROCKCHIP
 static void invalidate_sub(struct fsg_lun *curlun)
 {
        struct file *filp = curlun->filp;
@@ -1175,6 +1175,7 @@ static int do_verify(struct fsg_common *common)
        }
        return 0;
 }
+#endif
 
 /*-------------------------------------------------------------------------*/