mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[PATCH] USB: add notifier functions to the USB core for devices and busses
This should let us get rid of all of the different hooks in the USB core for when something has changed. Also, some other parts of the kernel have wanted to know this kind of information at times. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4592bf5a22
commit
3099e75a7c
6 changed files with 140 additions and 1 deletions
|
@ -1135,6 +1135,14 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out)
|
|||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/* Events from the usb core */
|
||||
#define USB_DEVICE_ADD 0x0001
|
||||
#define USB_DEVICE_REMOVE 0x0002
|
||||
#define USB_BUS_ADD 0x0003
|
||||
#define USB_BUS_REMOVE 0x0004
|
||||
extern void usb_register_notify(struct notifier_block *nb);
|
||||
extern void usb_unregister_notify(struct notifier_block *nb);
|
||||
|
||||
#ifdef DEBUG
|
||||
#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg)
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue