summaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-12-17 21:50:23 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 15:44:33 -0800
commit93bacefc4cc0b53e1cb6a336d43847154fdf6886 (patch)
tree4a82a9d2693d1165c58602a0bf4a8e5c76c541ef /include/linux/usb.h
parent495a678fc62e850d15f860d39faee07ba0a8910c (diff)
downloadop-kernel-dev-93bacefc4cc0b53e1cb6a336d43847154fdf6886.zip
op-kernel-dev-93bacefc4cc0b53e1cb6a336d43847154fdf6886.tar.gz
USB serial: add dynamic id support to usb-serial core
Thanks to Johannes Hölzl <johannes.hoelzl@gmx.de> for fixing a few things and getting it all working properly. This adds support for dynamic usb ids to the usb serial core. The file "new_id" will show up under the usb serial driver, not the usb driver associated with the usb-serial driver (yeah, it can be a bit confusing at first glance...) This patch also modifies the USB core to allow the usb-serial core to reuse much of the dynamic id logic. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index f3b2163..3cb9285 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -476,6 +476,8 @@ extern void usb_driver_release_interface(struct usb_driver *driver,
struct usb_interface *iface);
const struct usb_device_id *usb_match_id(struct usb_interface *interface,
const struct usb_device_id *id);
+extern int usb_match_one_id(struct usb_interface *interface,
+ const struct usb_device_id *id);
extern struct usb_interface *usb_find_interface(struct usb_driver *drv,
int minor);
@@ -724,11 +726,21 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor
/* ----------------------------------------------------------------------- */
+/* Stuff for dynamic usb ids */
struct usb_dynids {
spinlock_t lock;
struct list_head list;
};
+struct usb_dynid {
+ struct list_head node;
+ struct usb_device_id id;
+};
+
+extern ssize_t usb_store_new_id(struct usb_dynids *dynids,
+ struct device_driver *driver,
+ const char *buf, size_t count);
+
/**
* struct usbdrv_wrap - wrapper for driver-model structure
* @driver: The driver-model core driver structure.
OpenPOWER on IntegriCloud