vserver 2.0 rc7
[linux-2.6.git] / drivers / usb / core / usb.h
1 /* Functions local to drivers/usb/core/ */
2
3 extern void usb_create_sysfs_dev_files (struct usb_device *dev);
4 extern void usb_remove_sysfs_dev_files (struct usb_device *dev);
5 extern void usb_create_sysfs_intf_files (struct usb_interface *intf);
6 extern void usb_remove_sysfs_intf_files (struct usb_interface *intf);
7
8 extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr);
9 extern void usb_disable_interface (struct usb_device *dev,
10                 struct usb_interface *intf);
11 extern void usb_release_interface_cache(struct kref *ref);
12 extern void usb_disable_device (struct usb_device *dev, int skip_ep0);
13
14 extern int usb_get_device_descriptor(struct usb_device *dev,
15                 unsigned int size);
16 extern int usb_set_configuration(struct usb_device *dev, int configuration);
17
18 extern void usb_lock_all_devices(void);
19 extern void usb_unlock_all_devices(void);
20
21 extern void usb_kick_khubd(struct usb_device *dev);
22 extern void usb_resume_root_hub(struct usb_device *dev);
23
24 extern int  usb_hub_init(void);
25 extern void usb_hub_cleanup(void);
26 extern int usb_major_init(void);
27 extern void usb_major_cleanup(void);
28 extern int usb_host_init(void);
29 extern void usb_host_cleanup(void);
30
31 /* for labeling diagnostics */
32 extern const char *usbcore_name;
33
34 /* usbfs stuff */
35 extern struct usb_driver usbfs_driver;
36 extern struct file_operations usbfs_devices_fops;
37 extern struct file_operations usbfs_device_file_operations;
38 extern void usbfs_conn_disc_event(void);
39
40
41 struct dev_state {
42         struct list_head list;      /* state list */
43         struct usb_device *dev;
44         struct file *file;
45         spinlock_t lock;            /* protects the async urb lists */
46         struct list_head async_pending;
47         struct list_head async_completed;
48         wait_queue_head_t wait;     /* wake up if a request completed */
49         unsigned int discsignr;
50         struct task_struct *disctask;
51         void __user *disccontext;
52         unsigned long ifclaimed;
53 };
54