Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Mar 2008 01:45:23 +0000 (18:45 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Mar 2008 01:45:23 +0000 (18:45 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB:Update mailing list information in documentation
  USB: fix ehci unlink regressions
  USB: new ftdi_sio device id
  USB: Remove __KERNEL__ check from non-exported gadget.h.
  USB: g_printer.h does not need to be "unifdef"ed.
  USB: fsl_usb2_udc: fix broken Kconfig
  USB: option: add novatel device ids
  USB: usbaudio: handle kcalloc failure
  USB: cypress_m8: add UPS Powercom (0d9f:0002)
  USB: drivers/usb/storage/sddr55.c: fix uninitialized var warnings
  USB: fix usb-serial generic recursive lock

13 files changed:
Documentation/usb/usb-help.txt
drivers/usb/gadget/Kconfig
drivers/usb/host/ehci-hcd.c
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/cypress_m8.h
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/generic.c
drivers/usb/serial/option.c
drivers/usb/storage/sddr55.c
include/linux/usb/Kbuild
include/linux/usb/gadget.h
sound/usb/usbaudio.c

index a7408593829feb51c205f35b5647b961a8334a24..4273ca2b86bade2aa6c33b145bfa7035a61602db 100644 (file)
@@ -1,5 +1,5 @@
 usb-help.txt
-2000-July-12
+2008-Mar-7
 
 For USB help other than the readme files that are located in
 Documentation/usb/*, see the following:
@@ -10,9 +10,7 @@ Linux-USB project:  http://www.linux-usb.org
 Linux USB Guide:    http://linux-usb.sourceforge.net
 Linux-USB device overview (working devices and drivers):
                     http://www.qbik.ch/usb/devices/
-    
-The Linux-USB mailing lists are:
-  linux-usb-users@lists.sourceforge.net   for general user help
-  linux-usb-devel@lists.sourceforge.net   for developer discussions
+
+The Linux-USB mailing list is at linux-usb@vger.kernel.org
 
 ###
index c1395516468618c3683fccac3d27bc22bc5a0759..6f45dd669b3378a3f4bd0c9970fe65fdcdae6cbb 100644 (file)
@@ -131,7 +131,7 @@ config USB_ATMEL_USBA
 
 config USB_GADGET_FSL_USB2
        boolean "Freescale Highspeed USB DR Peripheral Controller"
-       depends on MPC834x || PPC_MPC831x
+       depends on FSL_SOC
        select USB_GADGET_DUALSPEED
        help
           Some of Freescale PowerPC processors have a High Speed
index b8ad55aff84282836425e814c2a84f93d31e7377..46ee7f4c091232f54c16de95e241e5a160ea5e67 100644 (file)
@@ -281,23 +281,44 @@ static void ehci_iaa_watchdog(unsigned long param)
 {
        struct ehci_hcd         *ehci = (struct ehci_hcd *) param;
        unsigned long           flags;
-       u32                     status, cmd;
 
        spin_lock_irqsave (&ehci->lock, flags);
-       WARN_ON(!ehci->reclaim);
 
-       status = ehci_readl(ehci, &ehci->regs->status);
-       cmd = ehci_readl(ehci, &ehci->regs->command);
-       ehci_dbg(ehci, "IAA watchdog: status %x cmd %x\n", status, cmd);
-
-       /* lost IAA irqs wedge things badly; seen first with a vt8235 */
-       if (ehci->reclaim) {
-               if (status & STS_IAA) {
-                       ehci_vdbg (ehci, "lost IAA\n");
+       /* Lost IAA irqs wedge things badly; seen first with a vt8235.
+        * So we need this watchdog, but must protect it against both
+        * (a) SMP races against real IAA firing and retriggering, and
+        * (b) clean HC shutdown, when IAA watchdog was pending.
+        */
+       if (ehci->reclaim
+                       && !timer_pending(&ehci->iaa_watchdog)
+                       && HC_IS_RUNNING(ehci_to_hcd(ehci)->state)) {
+               u32 cmd, status;
+
+               /* If we get here, IAA is *REALLY* late.  It's barely
+                * conceivable that the system is so busy that CMD_IAAD
+                * is still legitimately set, so let's be sure it's
+                * clear before we read STS_IAA.  (The HC should clear
+                * CMD_IAAD when it sets STS_IAA.)
+                */
+               cmd = ehci_readl(ehci, &ehci->regs->command);
+               if (cmd & CMD_IAAD)
+                       ehci_writel(ehci, cmd & ~CMD_IAAD,
+                                       &ehci->regs->command);
+
+               /* If IAA is set here it either legitimately triggered
+                * before we cleared IAAD above (but _way_ late, so we'll
+                * still count it as lost) ... or a silicon erratum:
+                * - VIA seems to set IAA without triggering the IRQ;
+                * - IAAD potentially cleared without setting IAA.
+                */
+               status = ehci_readl(ehci, &ehci->regs->status);
+               if ((status & STS_IAA) || !(cmd & CMD_IAAD)) {
                        COUNT (ehci->stats.lost_iaa);
                        ehci_writel(ehci, STS_IAA, &ehci->regs->status);
                }
-               ehci_writel(ehci, cmd & ~CMD_IAAD, &ehci->regs->command);
+
+               ehci_vdbg(ehci, "IAA watchdog: status %x cmd %x\n",
+                               status, cmd);
                end_unlink_async(ehci);
        }
 
@@ -631,7 +652,7 @@ static int ehci_run (struct usb_hcd *hcd)
 static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
-       u32                     status, pcd_status = 0;
+       u32                     status, pcd_status = 0, cmd;
        int                     bh;
 
        spin_lock (&ehci->lock);
@@ -652,7 +673,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 
        /* clear (just) interrupts */
        ehci_writel(ehci, status, &ehci->regs->status);
-       ehci_readl(ehci, &ehci->regs->command); /* unblock posted write */
+       cmd = ehci_readl(ehci, &ehci->regs->command);
        bh = 0;
 
 #ifdef EHCI_VERBOSE_DEBUG
@@ -673,8 +694,17 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 
        /* complete the unlinking of some qh [4.15.2.3] */
        if (status & STS_IAA) {
-               COUNT (ehci->stats.reclaim);
-               end_unlink_async(ehci);
+               /* guard against (alleged) silicon errata */
+               if (cmd & CMD_IAAD) {
+                       ehci_writel(ehci, cmd & ~CMD_IAAD,
+                                       &ehci->regs->command);
+                       ehci_dbg(ehci, "IAA with IAAD still set?\n");
+               }
+               if (ehci->reclaim) {
+                       COUNT(ehci->stats.reclaim);
+                       end_unlink_async(ehci);
+               } else
+                       ehci_dbg(ehci, "IAA with nothing to reclaim?\n");
        }
 
        /* remote wakeup [4.3.1] */
@@ -781,7 +811,7 @@ static int ehci_urb_enqueue (
 static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
 {
        /* failfast */
-       if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state))
+       if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) && ehci->reclaim)
                end_unlink_async(ehci);
 
        /* if it's not linked then there's nothing to do */
index 08c65c1a377163ded8eaf7f861674250852bcc6c..779d07851a4d820a4e32c372ed2e745798c82a27 100644 (file)
@@ -94,6 +94,7 @@ static struct usb_device_id id_table_earthmate [] = {
 
 static struct usb_device_id id_table_cyphidcomrs232 [] = {
        { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
+       { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
        { }                                             /* Terminating entry */
 };
 
@@ -106,6 +107,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) },
        { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) },
        { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
+       { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
        { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) },
        { }                                             /* Terminating entry */
 };
index e1c7c27e18b7d1551f18e97a79d5afaa75667315..0388065bb79451997f35edbdc7cd52f004d683ea 100644 (file)
 #define VENDOR_ID_CYPRESS               0x04b4
 #define PRODUCT_ID_CYPHIDCOM            0x5500
 
+/* Powercom UPS, chip CY7C63723 */
+#define VENDOR_ID_POWERCOM              0x0d9f
+#define PRODUCT_ID_UPS                  0x0002
+
 /* Nokia CA-42 USB to serial cable */
 #define VENDOR_ID_DAZZLE               0x07d0
 #define PRODUCT_ID_CA42                        0x4101
index 91dc433dbcf14048488239bc42a788024eadc32a..3abb3c863647832a31937fb3363f415f4a344ed9 100644 (file)
@@ -359,6 +359,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) },
        { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_PROPOX_JTAGCABLEII_PID) },
        { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID),
index e1eb742abcd5d081f467b01263a5bf45f26f54b3..6da539ede0ee992185ccb4b789b28f485bc39024 100644 (file)
 #define TML_VID                        0x1B91  /* Vendor ID */
 #define TML_USB_SERIAL_PID     0x0064  /* USB - Serial Converter */
 
+/* Propox devices */
+#define FTDI_PROPOX_JTAGCABLEII_PID    0xD738
+
 /* Commands */
 #define FTDI_SIO_RESET                 0 /* Reset the port */
 #define FTDI_SIO_MODEM_CTRL    1 /* Set the modem control register */
index 97fa3c4284350ab24a32cc9d46d69bc4e4fe39e2..7cfce9dabb9001c0f68bc68503c87e5bd07ed82a 100644 (file)
@@ -323,7 +323,7 @@ static void flush_and_resubmit_read_urb (struct usb_serial_port *port)
                room = tty_buffer_request_room(tty, urb->actual_length);
                if (room) {
                        tty_insert_flip_string(tty, urb->transfer_buffer, room);
-                       tty_flip_buffer_push(tty); /* is this allowed from an URB callback ? */
+                       tty_flip_buffer_push(tty);
                }
        }
 
@@ -349,10 +349,12 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb)
 
        /* Throttle the device if requested by tty */
        spin_lock_irqsave(&port->lock, flags);
-       if (!(port->throttled = port->throttle_req))
-               /* Handle data and continue reading from device */
+       if (!(port->throttled = port->throttle_req)) {
+               spin_unlock_irqrestore(&port->lock, flags);
                flush_and_resubmit_read_urb(port);
-       spin_unlock_irqrestore(&port->lock, flags);
+       } else {
+               spin_unlock_irqrestore(&port->lock, flags);
+       }
 }
 EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback);
 
index 828a4377ec6a1496c5898a6a12c6f3cd8c5f7497..a396fbbdc9c2cf13fc26f5e6e8390bd0eb625444 100644 (file)
@@ -111,6 +111,42 @@ static int  option_send_setup(struct usb_serial_port *port);
 #define HUAWEI_PRODUCT_E220BIS                 0x1004
 
 #define NOVATELWIRELESS_VENDOR_ID              0x1410
+
+/* MERLIN EVDO PRODUCTS */
+#define NOVATELWIRELESS_PRODUCT_V640           0x1100
+#define NOVATELWIRELESS_PRODUCT_V620           0x1110
+#define NOVATELWIRELESS_PRODUCT_V740           0x1120
+#define NOVATELWIRELESS_PRODUCT_V720           0x1130
+
+/* MERLIN HSDPA/HSPA PRODUCTS */
+#define NOVATELWIRELESS_PRODUCT_U730           0x1400
+#define NOVATELWIRELESS_PRODUCT_U740           0x1410
+#define NOVATELWIRELESS_PRODUCT_U870           0x1420
+#define NOVATELWIRELESS_PRODUCT_XU870          0x1430
+#define NOVATELWIRELESS_PRODUCT_X950D          0x1450
+
+/* EXPEDITE PRODUCTS */
+#define NOVATELWIRELESS_PRODUCT_EV620          0x2100
+#define NOVATELWIRELESS_PRODUCT_ES720          0x2110
+#define NOVATELWIRELESS_PRODUCT_E725           0x2120
+#define NOVATELWIRELESS_PRODUCT_EU730          0x2400
+#define NOVATELWIRELESS_PRODUCT_EU740          0x2410
+#define NOVATELWIRELESS_PRODUCT_EU870D         0x2420
+
+/* OVATION PRODUCTS */
+#define NOVATELWIRELESS_PRODUCT_MC727          0x4100
+#define NOVATELWIRELESS_PRODUCT_MC950D         0x4400
+
+/* FUTURE NOVATEL PRODUCTS */
+#define NOVATELWIRELESS_PRODUCT_EVDO_1         0x6000
+#define NOVATELWIRELESS_PRODUCT_HSPA_1         0x7000
+#define NOVATELWIRELESS_PRODUCT_EMBEDDED_1     0x8000
+#define NOVATELWIRELESS_PRODUCT_GLOBAL_1       0x9000
+#define NOVATELWIRELESS_PRODUCT_EVDO_2         0x6001
+#define NOVATELWIRELESS_PRODUCT_HSPA_2         0x7001
+#define NOVATELWIRELESS_PRODUCT_EMBEDDED_2     0x8001
+#define NOVATELWIRELESS_PRODUCT_GLOBAL_2       0x9001
+
 #define DELL_VENDOR_ID                         0x413C
 
 #define KYOCERA_VENDOR_ID                      0x0c88
@@ -168,21 +204,34 @@ static struct usb_device_id option_ids[] = {
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1130) }, /* Novatel Merlin S720 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1400) }, /* Novatel U730 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1410) }, /* Novatel U740 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1420) }, /* Novatel EU870 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2100) }, /* Novatel EV620 CDMA/EV-DO */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, /* Novatel Merlin EX720/V740/X720 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V720) }, /* Novatel Merlin V720/S720/PC720 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U730) }, /* Novatel U730/U740 (VF version) */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U740) }, /* Novatel U740 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U870) }, /* Novatel U870 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_XU870) }, /* Novatel Merlin XU870 HSDPA/3G */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_X950D) }, /* Novatel X950D */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) }, /* Novatel EV620/ES620 CDMA/EV-DO */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) }, /* Novatel ES620/ES720/U720/USB720 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) }, /* Novatel E725/E726 */
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4100) }, /* Novatel U727 */
-       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4400) }, /* Novatel MC950 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) }, /* Novatel EU730 and Vodafone EU740 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) }, /* Novatel non-Vodafone EU740 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_1) }, /* Novatel Global product */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_2) }, /* Novatel EVDO product */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_2) }, /* Novatel HSPA product */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */
+       { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */
+
        { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
        { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
        { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
index d43a3415e12f1d3aa105cfe0b2ff9cdd70c5c62c..6d14327c921d2e2be47cb3370ca9a2a1a349c9fb 100644 (file)
@@ -522,8 +522,8 @@ int sddr55_reset(struct us_data *us) {
 
 static unsigned long sddr55_get_capacity(struct us_data *us) {
 
-       unsigned char manufacturerID;
-       unsigned char deviceID;
+       unsigned char uninitialized_var(manufacturerID);
+       unsigned char uninitialized_var(deviceID);
        int result;
        struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
 
index b8cba1dcb2c63008a60f17926c40b3a5b728cc9c..42e84fc315e30f3a71396c29bc52375744fa49c7 100644 (file)
@@ -3,5 +3,5 @@ header-y += cdc.h
 header-y += ch9.h
 header-y += gadgetfs.h
 header-y += midi.h
-unifdef-y += g_printer.h
+header-y += g_printer.h
 
index aa3047ff00d13076e8ce29bd805b6a214b931945..f3295296b4353a5305ca3ee947d80b7ac3e0932b 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef __LINUX_USB_GADGET_H
 #define __LINUX_USB_GADGET_H
 
-#ifdef __KERNEL__
-
 struct usb_ep;
 
 /**
@@ -848,6 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
 
 extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit;
 
-#endif  /* __KERNEL__ */
-
 #endif /* __LINUX_USB_GADGET_H */
index 675672f313be322138c8902ce95a889a78c72782..f48838a078cb718c050cb02dd71945be16eaa88c 100644 (file)
@@ -1762,6 +1762,8 @@ static int check_hw_params_convention(struct snd_usb_substream *subs)
 
        channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
        rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
+       if (!channels || !rates)
+               goto __out;
 
        list_for_each(p, &subs->fmt_list) {
                struct audioformat *f;