]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/gmidi.c
Rename WARN() to WARNING() to clear the namespace
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / gmidi.c
index 0689189550bce6cab8b1800c4c161fdc14416e77..ea8651e3da1a53a205ffe67e88889b87d5073a89 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/utsname.h>
 #include <linux/device.h>
 
-#include <sound/driver.h>
 #include <sound/core.h>
 #include <sound/initval.h>
 #include <sound/rawmidi.h>
@@ -139,8 +138,6 @@ static void gmidi_transmit(struct gmidi_device* dev, struct usb_request* req);
        dev_vdbg(&(d)->gadget->dev , fmt , ## args)
 #define ERROR(d, fmt, args...) \
        dev_err(&(d)->gadget->dev , fmt , ## args)
-#define WARN(d, fmt, args...) \
-       dev_warn(&(d)->gadget->dev , fmt , ## args)
 #define INFO(d, fmt, args...) \
        dev_info(&(d)->gadget->dev , fmt , ## args)
 
@@ -230,7 +227,7 @@ static const struct usb_ac_header_descriptor_1 ac_header_desc = {
        .bDescriptorType =      USB_DT_CS_INTERFACE,
        .bDescriptorSubtype =   USB_MS_HEADER,
        .bcdADC =               __constant_cpu_to_le16(0x0100),
-       .wTotalLength =         USB_DT_AC_HEADER_SIZE(1),
+       .wTotalLength =         __constant_cpu_to_le16(USB_DT_AC_HEADER_SIZE(1)),
        .bInCollection =        1,
        .baInterfaceNr = {
                [0] =           GMIDI_MS_INTERFACE,
@@ -254,9 +251,9 @@ static const struct usb_ms_header_descriptor ms_header_desc = {
        .bDescriptorType =      USB_DT_CS_INTERFACE,
        .bDescriptorSubtype =   USB_MS_HEADER,
        .bcdMSC =               __constant_cpu_to_le16(0x0100),
-       .wTotalLength =         USB_DT_MS_HEADER_SIZE
+       .wTotalLength =         __constant_cpu_to_le16(USB_DT_MS_HEADER_SIZE
                                + 2*USB_DT_MIDI_IN_SIZE
-                               + 2*USB_DT_MIDI_OUT_SIZE(1),
+                               + 2*USB_DT_MIDI_OUT_SIZE(1)),
 };
 
 #define JACK_IN_EMB    1
@@ -1150,7 +1147,7 @@ fail:
 /*
  * Creates an output endpoint, and initializes output ports.
  */
-static int __devinit gmidi_bind(struct usb_gadget *gadget)
+static int __init gmidi_bind(struct usb_gadget *gadget)
 {
        struct gmidi_device *dev;
        struct usb_ep *in_ep, *out_ep;
@@ -1159,7 +1156,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget)
        /* support optional vendor/distro customization */
        if (idVendor) {
                if (!idProduct) {
-                       printk(KERN_ERR "idVendor needs idProduct!\n");
+                       pr_err("idVendor needs idProduct!\n");
                        return -ENODEV;
                }
                device_desc.idVendor = cpu_to_le16(idVendor);
@@ -1191,7 +1188,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget)
        in_ep = usb_ep_autoconfig(gadget, &bulk_in_desc);
        if (!in_ep) {
 autoconf_fail:
-               printk(KERN_ERR "%s: can't autoconfigure on %s\n",
+               pr_err("%s: can't autoconfigure on %s\n",
                        shortname, gadget->name);
                return -ENODEV;
        }
@@ -1213,7 +1210,7 @@ autoconf_fail:
                 * it SHOULD NOT have problems with bulk-capable hardware.
                 * so warn about unrecognized controllers, don't panic.
                 */
-               printk(KERN_WARNING "%s: controller '%s' not recognized\n",
+               pr_warning("%s: controller '%s' not recognized\n",
                        shortname, gadget->name);
                device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);
        }