summaryrefslogtreecommitdiff
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-05-04 11:47:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-04 18:23:03 +0200
commit562be61b35d911a8b45acc3dcf8642876dbb66dd (patch)
tree8e2b1b8ce862263398c00b89717ccff69eb7b9cd /include/linux/usb.h
parent8bbe44ce6543830c520a6424d388ed70e1baae95 (diff)
usb: core: Remove the useless struct usb_devmap which is just a bitmap
struct usb_devmap is really just a bitmap. No need to have a dedicated structure for that. Simplify code and use DECLARE_BITMAP() directly instead. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/1d818575ff7a1e8317674aecf761ee23c89fdc84.1714815990.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 9e52179872a5..1913a13833f2 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -440,11 +440,6 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
/* ----------------------------------------------------------------------- */
-/* USB device number allocation bitmap */
-struct usb_devmap {
- unsigned long devicemap[128 / (8*sizeof(unsigned long))];
-};
-
/*
* Allocated per bus (tree of devices) we have:
*/
@@ -472,7 +467,7 @@ struct usb_bus {
* round-robin allocation */
struct mutex devnum_next_mutex; /* devnum_next mutex */
- struct usb_devmap devmap; /* device address allocation map */
+ DECLARE_BITMAP(devmap, 128); /* USB device number allocation bitmap */
struct usb_device *root_hub; /* Root hub */
struct usb_bus *hs_companion; /* Companion EHCI bus, if any */