]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/usb/core/usb.h
[PATCH] USB: move handoff code
[mirror_ubuntu-artful-kernel.git] / drivers / usb / core / usb.h
CommitLineData
1da177e4
LT
1/* Functions local to drivers/usb/core/ */
2
3extern void usb_create_sysfs_dev_files (struct usb_device *dev);
4extern void usb_remove_sysfs_dev_files (struct usb_device *dev);
5extern void usb_create_sysfs_intf_files (struct usb_interface *intf);
6extern void usb_remove_sysfs_intf_files (struct usb_interface *intf);
7
8extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr);
9extern void usb_disable_interface (struct usb_device *dev,
10 struct usb_interface *intf);
11extern void usb_release_interface_cache(struct kref *ref);
12extern void usb_disable_device (struct usb_device *dev, int skip_ep0);
13
14extern int usb_get_device_descriptor(struct usb_device *dev,
15 unsigned int size);
16extern int usb_set_configuration(struct usb_device *dev, int configuration);
17
18extern void usb_lock_all_devices(void);
19extern void usb_unlock_all_devices(void);
20
21extern void usb_kick_khubd(struct usb_device *dev);
22extern void usb_resume_root_hub(struct usb_device *dev);
23
6d5e8254
GKH
24extern int usb_hub_init(void);
25extern void usb_hub_cleanup(void);
26extern int usb_major_init(void);
27extern void usb_major_cleanup(void);
28extern int usb_host_init(void);
29extern void usb_host_cleanup(void);
30
1da177e4
LT
31/* for labeling diagnostics */
32extern const char *usbcore_name;
33
34/* usbfs stuff */
35extern struct usb_driver usbfs_driver;
36extern struct file_operations usbfs_devices_fops;
37extern struct file_operations usbfs_device_file_operations;
38extern void usbfs_conn_disc_event(void);
39
fbf82fd2
KS
40extern int usbdev_init(void);
41extern void usbdev_cleanup(void);
42extern void usbdev_add(struct usb_device *dev);
43extern void usbdev_remove(struct usb_device *dev);
44extern struct usb_device *usbdev_lookup_minor(int minor);
6d5e8254 45
1da177e4
LT
46struct dev_state {
47 struct list_head list; /* state list */
48 struct usb_device *dev;
49 struct file *file;
50 spinlock_t lock; /* protects the async urb lists */
51 struct list_head async_pending;
52 struct list_head async_completed;
53 wait_queue_head_t wait; /* wake up if a request completed */
54 unsigned int discsignr;
d7dd8a72
LT
55 pid_t disc_pid;
56 uid_t disc_uid, disc_euid;
1da177e4
LT
57 void __user *disccontext;
58 unsigned long ifclaimed;
59};
60