upgrade to linux 2.6.10-1.12_FC2
[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_endpoint (struct usb_device *dev,
17                 struct usb_endpoint_descriptor *epd);
18 extern void usb_enable_interface (struct usb_device *dev,
19                 struct usb_interface *intf);
20
21 extern int usb_get_device_descriptor(struct usb_device *dev,
22                 unsigned int size);
23 extern int usb_set_configuration(struct usb_device *dev, int configuration);
24
25 extern void usb_lock_all_devices(void);
26 extern void usb_unlock_all_devices(void);
27
28 /* for labeling diagnostics */
29 extern const char *usbcore_name;
30
31 /* usbfs stuff */
32 extern struct usb_driver usbfs_driver;
33 extern struct file_operations usbfs_devices_fops;
34 extern struct file_operations usbfs_device_file_operations;
35 extern void usbfs_conn_disc_event(void);
36
37 struct dev_state {
38         struct list_head list;      /* state list */
39         struct usb_device *dev;
40         struct file *file;
41         spinlock_t lock;            /* protects the async urb lists */
42         struct list_head async_pending;
43         struct list_head async_completed;
44         wait_queue_head_t wait;     /* wake up if a request completed */
45         unsigned int discsignr;
46         struct task_struct *disctask;
47         void __user *disccontext;
48         unsigned long ifclaimed;
49 };
50