Commit b1d0f8a2 authored by Rusty Russell's avatar Rusty Russell Committed by Greg Kroah-Hartman

[PATCH] USB set-bit takes a long tweaks

This removes gratuitous & operators in front of USB's
dev->bus->devmap.devicemap and state->unitbitmap, for bitops.

This just makes it so it doesn't warn when set_bit et. al take a
long...

No object code changes,
Rusty.
parent 7cc718a8
...@@ -3523,7 +3523,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit ...@@ -3523,7 +3523,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
unsigned char *p1; unsigned char *p1;
unsigned int i, j; unsigned int i, j;
if (test_and_set_bit(unitid, &state->unitbitmap)) { if (test_and_set_bit(unitid, state->unitbitmap)) {
printk(KERN_INFO "usbaudio: mixer path revisits unit %d\n", unitid); printk(KERN_INFO "usbaudio: mixer path revisits unit %d\n", unitid);
return; return;
} }
...@@ -3613,7 +3613,7 @@ static void usb_audio_constructmixer(struct usb_audio_state *s, unsigned char *b ...@@ -3613,7 +3613,7 @@ static void usb_audio_constructmixer(struct usb_audio_state *s, unsigned char *b
state.buffer = buffer; state.buffer = buffer;
state.buflen = buflen; state.buflen = buflen;
state.ctrlif = ctrlif; state.ctrlif = ctrlif;
set_bit(oterm[3], &state.unitbitmap); /* mark terminal ID as visited */ set_bit(oterm[3], state.unitbitmap); /* mark terminal ID as visited */
printk(KERN_DEBUG "usbaudio: constructing mixer for Terminal %u type 0x%04x\n", printk(KERN_DEBUG "usbaudio: constructing mixer for Terminal %u type 0x%04x\n",
oterm[3], oterm[4] | (oterm[5] << 8)); oterm[3], oterm[4] | (oterm[5] << 8));
usb_audio_recurseunit(&state, oterm[7]); usb_audio_recurseunit(&state, oterm[7]);
......
...@@ -1122,7 +1122,7 @@ int usb_reset_device(struct usb_device *dev) ...@@ -1122,7 +1122,7 @@ int usb_reset_device(struct usb_device *dev)
dev->devpath, dev->devpath,
sizeof(dev->descriptor), ret); sizeof(dev->descriptor), ret);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
return -EIO; return -EIO;
} }
...@@ -1131,7 +1131,7 @@ int usb_reset_device(struct usb_device *dev) ...@@ -1131,7 +1131,7 @@ int usb_reset_device(struct usb_device *dev)
if (ret < 0) { if (ret < 0) {
err("unable to get configuration (error=%d)", ret); err("unable to get configuration (error=%d)", ret);
usb_destroy_configuration(dev); usb_destroy_configuration(dev);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
return 1; return 1;
} }
......
...@@ -1784,7 +1784,7 @@ void usb_disconnect(struct usb_device **pdev) ...@@ -1784,7 +1784,7 @@ void usb_disconnect(struct usb_device **pdev)
/* Free the device number and remove the /proc/bus/usb entry */ /* Free the device number and remove the /proc/bus/usb entry */
if (dev->devnum > 0) { if (dev->devnum > 0) {
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
usbfs_remove_device(dev); usbfs_remove_device(dev);
put_device(&dev->dev); put_device(&dev->dev);
} }
...@@ -2434,7 +2434,7 @@ int usb_new_device(struct usb_device *dev) ...@@ -2434,7 +2434,7 @@ int usb_new_device(struct usb_device *dev)
if (err < 0) { if (err < 0) {
err("USB device not accepting new address=%d (error=%d)", err("USB device not accepting new address=%d (error=%d)",
dev->devnum, err); dev->devnum, err);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
return 1; return 1;
} }
...@@ -2447,7 +2447,7 @@ int usb_new_device(struct usb_device *dev) ...@@ -2447,7 +2447,7 @@ int usb_new_device(struct usb_device *dev)
err("USB device not responding, giving up (error=%d)", err); err("USB device not responding, giving up (error=%d)", err);
else else
err("USB device descriptor short read (expected %i, got %i)", 8, err); err("USB device descriptor short read (expected %i, got %i)", 8, err);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
return 1; return 1;
} }
...@@ -2462,7 +2462,7 @@ int usb_new_device(struct usb_device *dev) ...@@ -2462,7 +2462,7 @@ int usb_new_device(struct usb_device *dev)
err("USB device descriptor short read (expected %Zi, got %i)", err("USB device descriptor short read (expected %Zi, got %i)",
sizeof(dev->descriptor), err); sizeof(dev->descriptor), err);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
return 1; return 1;
} }
...@@ -2471,7 +2471,7 @@ int usb_new_device(struct usb_device *dev) ...@@ -2471,7 +2471,7 @@ int usb_new_device(struct usb_device *dev)
if (err < 0) { if (err < 0) {
err("unable to get device %d configuration (error=%d)", err("unable to get device %d configuration (error=%d)",
dev->devnum, err); dev->devnum, err);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
return 1; return 1;
} }
...@@ -2481,7 +2481,7 @@ int usb_new_device(struct usb_device *dev) ...@@ -2481,7 +2481,7 @@ int usb_new_device(struct usb_device *dev)
if (err) { if (err) {
err("failed to set device %d default configuration (error=%d)", err("failed to set device %d default configuration (error=%d)",
dev->devnum, err); dev->devnum, err);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap); clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1; dev->devnum = -1;
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment