USB: struct usb_device: change flag to bitflag
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 20 Nov 2006 16:12:22 +0000 (11:12 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:25:52 +0000 (14:25 -0800)
This patch (as816) changes an existing flag in the usb_device
structure to a bitflag, preparing the way for more bitflags to come
in the future.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/message.c
include/linux/usb.h

index 7729c074488606ab8e926dfd95611b7606005ed9..5684d872292263668b818935ef41ad1c16cd24c7 100644 (file)
@@ -764,7 +764,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
                        err = -EINVAL;
                        goto errout;
                } else {
-                       dev->have_langid = -1;
+                       dev->have_langid = 1;
                        dev->string_langid = tbuf[2] | (tbuf[3]<< 8);
                                /* always use the first langid listed */
                        dev_dbg (&dev->dev, "default language 0x%04x\n",
index 864c6c21c21e8a0b5ca2c5769a422909d3d67f7b..5634a2d91ec03a41fb0842efe3ee9ac09c8fa291 100644 (file)
@@ -362,7 +362,7 @@ struct usb_device {
        u8 portnum;                     /* Parent port number (origin 1) */
        u8 level;                       /* Number of USB hub ancestors */
 
-       int have_langid;                /* whether string_langid is valid */
+       unsigned have_langid:1;         /* whether string_langid is valid */
        int string_langid;              /* language ID for strings */
 
        /* static strings from the device */