]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] USB core update
authorGreg Kroah-Hartman <greg@kroah.com>
Tue, 5 Feb 2002 09:17:18 +0000 (01:17 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 5 Feb 2002 09:17:18 +0000 (01:17 -0800)
Here's a patch against 2.5.3 for the USB core that fixes a possible
initialization bug for some platforms when allocating a new usb, and
changes the warning level on a message (it isn't an error.)  This patch
was done by Oliver Neukum and David Brownell.

drivers/usb/usb.c

index a6dfc4e70758559a0552d9893c73d64e20d1c674..06b8c6623c43c9fe91e2c2d661bf2c196f9a37df 100644 (file)
@@ -1100,7 +1100,7 @@ struct urb *usb_alloc_urb(int iso_packets)
        }
 
        memset(urb, 0, sizeof(*urb));
-       atomic_inc(&urb->count);
+       urb->count = (atomic_t)ATOMIC_INIT(1);
        spin_lock_init(&urb->lock);
 
        return urb;
@@ -2283,7 +2283,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate)
        /* 9.4.10 says devices don't need this, if the interface
           only has one alternate setting */
        if (iface->num_altsetting == 1) {
-               warn("ignoring set_interface for dev %d, iface %d, alt %d",
+               dbg("ignoring set_interface for dev %d, iface %d, alt %d",
                        dev->devnum, interface, alternate);
                return 0;
        }