[PATCH] USB: allow usb drivers to disable dynamic ids

This lets drivers, like the usb-serial ones, disable the ability to add
ids from sysfs.

The usb-serial drivers are "odd" in that they are really usb-serial bus
drivers, not usb bus drivers, so the dynamic id logic will have to go
into the usb-serial bus core for those drivers to get that ability.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman
2005-11-16 13:41:28 -08:00
parent 733260ff9c
commit ba9dc657af
32 changed files with 52 additions and 0 deletions

View File

@@ -561,6 +561,8 @@ struct usb_dynids {
* @dynids: used internally to hold the list of dynamically added device
* ids for this driver.
* @driver: the driver model core driver structure.
* @no_dynamic_id: if set to 1, the USB core will not allow dynamic ids to be
* added to this driver by preventing the sysfs file from being created.
*
* USB drivers must provide a name, probe() and disconnect() methods,
* and an id_table. Other driver fields are optional.
@@ -597,6 +599,7 @@ struct usb_driver {
struct usb_dynids dynids;
struct device_driver driver;
unsigned int no_dynamic_id:1;
};
#define to_usb_driver(d) container_of(d, struct usb_driver, driver)