vserver 1.9.5.x5
[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 extern int usb_probe_interface (struct device *dev);
8 extern int usb_unbind_interface (struct device *dev);
9
10 extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr);
11 extern void usb_disable_interface (struct usb_device *dev,
12                 struct usb_interface *intf);
13 extern void usb_release_interface_cache(struct kref *ref);
14 extern void usb_disable_device (struct usb_device *dev, int skip_ep0);
15
16 extern void usb_enable_interface (struct usb_device *dev,
17                 struct usb_interface *intf);
18
19 extern int usb_get_device_descriptor(struct usb_device *dev,
20                 unsigned int size);
21 extern int usb_set_configuration(struct usb_device *dev, int configuration);
22
23 extern void usb_lock_all_devices(void);
24 extern void usb_unlock_all_devices(void);
25
26 /* for labeling diagnostics */
27 extern const char *usbcore_name;
28
29 /* usbfs stuff */
30 extern struct usb_driver usbfs_driver;
31 extern struct file_operations usbfs_devices_fops;
32 extern struct file_operations usbfs_device_file_operations;
33 extern void usbfs_conn_disc_event(void);
34
35 struct dev_state {
36         struct list_head list;      /* state list */
37         struct usb_device *dev;
38         struct file *file;
39         spinlock_t lock;            /* protects the async urb lists */
40         struct list_head async_pending;
41         struct list_head async_completed;
42         wait_queue_head_t wait;     /* wake up if a request completed */
43         unsigned int discsignr;
44         struct task_struct *disctask;
45         void __user *disccontext;
46         unsigned long ifclaimed;
47 };
48