diff options
Diffstat (limited to 'drivers/usb/gadget')
27 files changed, 40 insertions, 3 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 12ac9cd32a07..df1bae9b048e 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1370,6 +1370,12 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) { struct at91_udc *udc = _udc; u32 rescans = 5; + int disable_clock = 0; + + if (!udc->clocked) { + clk_on(udc); + disable_clock = 1; + } while (rescans--) { u32 status; @@ -1458,6 +1464,9 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) } } + if (disable_clock) + clk_off(udc); + return IRQ_HANDLED; } diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index f79bdfe4bed9..75a256f3d45b 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -12,6 +12,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/slab.h> #include <linux/device.h> #include <linux/dma-mapping.h> #include <linux/list.h> diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index c7cb87a6fee2..699695128e33 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -62,6 +62,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/pci.h> +#include <linux/slab.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c index e1191b9a316a..47e8e722682c 100644 --- a/drivers/usb/gadget/config.c +++ b/drivers/usb/gadget/config.c @@ -19,6 +19,7 @@ */ #include <linux/errno.h> +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/string.h> diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index e49c7325dce2..400e1ebe6976 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c @@ -14,6 +14,7 @@ /* #define VERBOSE_DEBUG */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> diff --git a/drivers/usb/gadget/f_audio.c b/drivers/usb/gadget/f_audio.c index f1e3aad76c37..43bf44514c41 100644 --- a/drivers/usb/gadget/f_audio.c +++ b/drivers/usb/gadget/f_audio.c @@ -9,6 +9,7 @@ * Licensed under the GPL-2 or later. */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> #include <asm/atomic.h> diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index 2fff530efc19..4e595324c614 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c @@ -21,6 +21,7 @@ /* #define VERBOSE_DEBUG */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> #include <linux/etherdevice.h> diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index d4f0db58a8ad..38226e9a371d 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c @@ -24,6 +24,7 @@ #include <linux/device.h> #include <linux/etherdevice.h> #include <linux/crc32.h> +#include <linux/slab.h> #include "u_ether.h" diff --git a/drivers/usb/gadget/f_loopback.c b/drivers/usb/gadget/f_loopback.c index 6cb29d3df575..e91d1b16d9be 100644 --- a/drivers/usb/gadget/f_loopback.c +++ b/drivers/usb/gadget/f_loopback.c @@ -21,6 +21,7 @@ /* #define VERBOSE_DEBUG */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/f_obex.c index b4a3ba654ea5..8f8c64371475 100644 --- a/drivers/usb/gadget/f_obex.c +++ b/drivers/usb/gadget/f_obex.c @@ -23,6 +23,7 @@ /* #define VERBOSE_DEBUG */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c index d2de10b9dc4b..3c6e1a058745 100644 --- a/drivers/usb/gadget/f_phonet.c +++ b/drivers/usb/gadget/f_phonet.c @@ -20,6 +20,7 @@ * 02110-1301 USA */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index a30e60c7f129..56b022150f22 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -24,6 +24,7 @@ /* #define VERBOSE_DEBUG */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> #include <linux/etherdevice.h> diff --git a/drivers/usb/gadget/f_serial.c b/drivers/usb/gadget/f_serial.c index db0aa93606ef..490b00b01a7d 100644 --- a/drivers/usb/gadget/f_serial.c +++ b/drivers/usb/gadget/f_serial.c @@ -10,6 +10,7 @@ * either version 2 of that License or (at your option) any later version. */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c index 09cba273d2db..6d3cc443d914 100644 --- a/drivers/usb/gadget/f_sourcesink.c +++ b/drivers/usb/gadget/f_sourcesink.c @@ -21,6 +21,7 @@ /* #define VERBOSE_DEBUG */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c index a9c98fdb626d..8675ca415329 100644 --- a/drivers/usb/gadget/f_subset.c +++ b/drivers/usb/gadget/f_subset.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/slab.h> #include <linux/kernel.h> #include <linux/device.h> #include <linux/etherdevice.h> diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 04f6224b7e06..2b56ce621852 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c @@ -21,6 +21,7 @@ /* #define VERBOSE_DEBUG */ #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/utsname.h> #include <linux/device.h> diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 01ee0b9bc957..e743122fcd93 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -29,6 +29,7 @@ #include <linux/clk.h> #include <linux/delay.h> #include <linux/timer.h> +#include <linux/slab.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 6cd3d54f5640..fded3fca793b 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c @@ -22,6 +22,7 @@ */ #include <linux/platform_device.h> +#include <linux/slab.h> #include "lh7a40x_udc.h" diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index a8c8543d1b08..166bf71fd348 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c @@ -25,6 +25,7 @@ #include <linux/delay.h> #include <linux/io.h> #include <linux/platform_device.h> +#include <linux/slab.h> #include <linux/err.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 05b892c3d686..85b0d8921eae 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -31,6 +31,7 @@ #include <linux/clk.h> #include <linux/irq.h> #include <linux/gpio.h> +#include <linux/slab.h> #include <asm/byteorder.h> #include <mach/hardware.h> diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 5e13d23b5f0c..888d8f166c0b 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c @@ -23,11 +23,11 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/err.h> #include <linux/io.h> #include <linux/platform_device.h> #include <linux/clk.h> #include <linux/err.h> +#include <linux/slab.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 48267bc0b2e0..5c0d06c79a81 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -28,6 +28,7 @@ #include <linux/init.h> #include <linux/list.h> #include <linux/proc_fs.h> +#include <linux/slab.h> #include <linux/seq_file.h> #include <linux/netdevice.h> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index f742c8e7397c..1f73b485732d 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -22,6 +22,7 @@ #include <linux/seq_file.h> #include <linux/delay.h> #include <linux/io.h> +#include <linux/slab.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> @@ -2144,6 +2145,7 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, u32 epctrl; u32 mps; int dir_in; + int ret = 0; dev_dbg(hsotg->dev, "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", @@ -2195,7 +2197,8 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { case USB_ENDPOINT_XFER_ISOC: dev_err(hsotg->dev, "no current ISOC support\n"); - return -EINVAL; + ret = -EINVAL; + goto out; case USB_ENDPOINT_XFER_BULK: epctrl |= S3C_DxEPCTL_EPType_Bulk; @@ -2234,8 +2237,9 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, /* enable the endpoint interrupt */ s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); +out: spin_unlock_irqrestore(&hs_ep->lock, flags); - return 0; + return ret; } static int s3c_hsotg_ep_disable(struct usb_ep *ep) diff --git a/drivers/usb/gadget/u_audio.c b/drivers/usb/gadget/u_audio.c index 35e0930f5bbb..7a86d2c9109c 100644 --- a/drivers/usb/gadget/u_audio.c +++ b/drivers/usb/gadget/u_audio.c @@ -10,6 +10,7 @@ */ #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/device.h> #include <linux/delay.h> #include <linux/ctype.h> diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 84ca195c2d10..07f4178ad178 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c @@ -23,6 +23,7 @@ /* #define VERBOSE_DEBUG */ #include <linux/kernel.h> +#include <linux/gfp.h> #include <linux/device.h> #include <linux/ctype.h> #include <linux/etherdevice.h> diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index adf8260c3a6a..16bdf77f582a 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c @@ -23,6 +23,7 @@ #include <linux/delay.h> #include <linux/tty.h> #include <linux/tty_flip.h> +#include <linux/slab.h> #include "u_serial.h" diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index fac81ee193dd..807280d069f9 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c @@ -50,6 +50,7 @@ /* #define VERBOSE_DEBUG */ #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/utsname.h> #include <linux/device.h> |