Skip to content

Commit 01ec4a2

Browse files
Ingo Molnargregkh
authored andcommitted
headers/deps: USB: Optimize <linux/usb/ch9.h> dependencies, remove <linux/device.h>
The <linux/usb/ch9.h> header is used over 1,400 times in a typical distro build, but few of its users actually need the full <linux/device.h> header. -------------------------------------------------------------------- | Combined, preprocessed C code size of header, without line markers, | with comments stripped: ------------------------- before: | #include <linux/usb/ch9.h> | LOC: 7,078 | headers: 172 after: | #include <linux/usb/ch9.h> | LOC: 812 | headers: 38 Remove it and add it to the places that need it. Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 66b13ce commit 01ec4a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/usb/ch9.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#ifndef __LINUX_USB_CH9_H
3434
#define __LINUX_USB_CH9_H
3535

36-
#include <linux/device.h>
3736
#include <uapi/linux/usb/ch9.h>
3837

3938
/* USB 3.2 SuperSpeed Plus phy signaling rate generation and lane count */
@@ -45,6 +44,8 @@ enum usb_ssp_rate {
4544
USB_SSP_GEN_2x2,
4645
};
4746

47+
struct device;
48+
4849
extern const char *usb_ep_type_string(int ep_type);
4950
extern const char *usb_speed_string(enum usb_device_speed speed);
5051
extern enum usb_device_speed usb_get_maximum_speed(struct device *dev);

0 commit comments

Comments
 (0)