diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/f_eem.c | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/fsl_mx3_udc.c | 31 | ||||
-rw-r--r-- | drivers/usb/gadget/multi.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/pxa25x_udc.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/r8a66597-udc.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 1 |
6 files changed, 28 insertions, 14 deletions
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index 0a577d5694f..d4f0db58a8a 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c @@ -358,7 +358,7 @@ done: * b15: bmType (0 == data) */ len = skb->len; - put_unaligned_le16((len & 0x3FFF) | BIT(14), skb_push(skb, 2)); + put_unaligned_le16(len & 0x3FFF, skb_push(skb, 2)); /* add a zero-length EEM packet, if needed */ if (padlen) @@ -464,7 +464,6 @@ static int eem_unwrap(struct gether *port, } /* validate CRC */ - crc = get_unaligned_le32(skb->data + len - ETH_FCS_LEN); if (header & BIT(14)) { crc = get_unaligned_le32(skb->data + len - ETH_FCS_LEN); diff --git a/drivers/usb/gadget/fsl_mx3_udc.c b/drivers/usb/gadget/fsl_mx3_udc.c index 4bc2bf3d602..20a802ecaa1 100644 --- a/drivers/usb/gadget/fsl_mx3_udc.c +++ b/drivers/usb/gadget/fsl_mx3_udc.c @@ -17,6 +17,8 @@ #include <linux/fsl_devices.h> #include <linux/platform_device.h> +#include <mach/hardware.h> + static struct clk *mxc_ahb_clk; static struct clk *mxc_usb_clk; @@ -28,14 +30,16 @@ int fsl_udc_clk_init(struct platform_device *pdev) pdata = pdev->dev.platform_data; - mxc_ahb_clk = clk_get(&pdev->dev, "usb_ahb"); - if (IS_ERR(mxc_ahb_clk)) - return PTR_ERR(mxc_ahb_clk); + if (!cpu_is_mx35()) { + mxc_ahb_clk = clk_get(&pdev->dev, "usb_ahb"); + if (IS_ERR(mxc_ahb_clk)) + return PTR_ERR(mxc_ahb_clk); - ret = clk_enable(mxc_ahb_clk); - if (ret < 0) { - dev_err(&pdev->dev, "clk_enable(\"usb_ahb\") failed\n"); - goto eenahb; + ret = clk_enable(mxc_ahb_clk); + if (ret < 0) { + dev_err(&pdev->dev, "clk_enable(\"usb_ahb\") failed\n"); + goto eenahb; + } } /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */ @@ -50,6 +54,7 @@ int fsl_udc_clk_init(struct platform_device *pdev) if (pdata->phy_mode != FSL_USB2_PHY_ULPI && (freq < 59999000 || freq > 60001000)) { dev_err(&pdev->dev, "USB_CLK=%lu, should be 60MHz\n", freq); + ret = -EINVAL; goto eclkrate; } @@ -66,9 +71,11 @@ eclkrate: clk_put(mxc_usb_clk); mxc_usb_clk = NULL; egusb: - clk_disable(mxc_ahb_clk); + if (!cpu_is_mx35()) + clk_disable(mxc_ahb_clk); eenahb: - clk_put(mxc_ahb_clk); + if (!cpu_is_mx35()) + clk_put(mxc_ahb_clk); return ret; } @@ -90,6 +97,8 @@ void fsl_udc_clk_release(void) clk_disable(mxc_usb_clk); clk_put(mxc_usb_clk); } - clk_disable(mxc_ahb_clk); - clk_put(mxc_ahb_clk); + if (!cpu_is_mx35()) { + clk_disable(mxc_ahb_clk); + clk_put(mxc_ahb_clk); + } } diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 429560100b1..76496f5d272 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -29,7 +29,7 @@ #if defined USB_ETH_RNDIS # undef USB_ETH_RNDIS #endif -#ifdef CONFIG_USB_ETH_RNDIS +#ifdef CONFIG_USB_G_MULTI_RNDIS # define USB_ETH_RNDIS y #endif diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index e6fedbd5a65..be5fb34d960 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c @@ -65,6 +65,10 @@ #include <mach/pxa25x-udc.h> #endif +#ifdef CONFIG_ARCH_LUBBOCK +#include <mach/lubbock.h> +#endif + #include <asm/mach/udc_pxa2xx.h> diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index e220fb8091a..8b45145b913 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c @@ -26,6 +26,7 @@ #include <linux/io.h> #include <linux/platform_device.h> #include <linux/clk.h> +#include <linux/err.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 458f7651957..9941fc61341 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -2582,6 +2582,7 @@ err: hsotg->gadget.dev.driver = NULL; return ret; } +EXPORT_SYMBOL(usb_gadget_register_driver); int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) { |