From: wlf Date: Thu, 12 Jun 2014 02:33:18 +0000 (+0800) Subject: USB: fix compile warnings. X-Git-Tag: firefly_0821_release~5142 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=41847c7d7ce2000eff8408f403cce8ded8340510;p=firefly-linux-kernel-4.4.55.git USB: fix compile warnings. --- 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 4459547e82eb..8d47342f12a2 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c @@ -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); diff --git a/drivers/usb/dwc_otg_310/usbdev_rk32.c b/drivers/usb/dwc_otg_310/usbdev_rk32.c index 426ba0673e7e..d1a9406fe3f9 100755 --- a/drivers/usb/dwc_otg_310/usbdev_rk32.c +++ b/drivers/usb/dwc_otg_310/usbdev_rk32.c @@ -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) { diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index f39c0330a277..4bcca7cee4d9 100755 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -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 /*-------------------------------------------------------------------------*/