From 6179b5562d5d17c7c09b54cb11dd925ca308d7a9 Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Sun, 6 May 2007 14:48:44 -0700 Subject: add new_id to PCMCIA drivers PCI drivers have the new_id file in sysfs which allows new IDs to be added at runtime. The advantage is to avoid re-compilation of a driver that works for a new device, but it's ID table doesn't contain the new device. This mechanism is only meant for testing, after the driver has been tested successfully, the ID should be added in source code so that new revisions of the kernel automatically detect the device. The implementation follows the PCI implementation. The interface is documented in Documentation/pcmcia/driver.txt. Computations should be done in userspace, so the sysfs string contains the raw structure members for matching. Signed-off-by: Bernhard Walle Cc: Dominik Brodowski Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/pcmcia/ds.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 8c339f5678c..90ef552c42d 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h @@ -108,6 +108,11 @@ typedef struct dev_node_t { struct pcmcia_socket; struct config_t; +struct pcmcia_dynids { + spinlock_t lock; + struct list_head list; +}; + struct pcmcia_driver { int (*probe) (struct pcmcia_device *dev); void (*remove) (struct pcmcia_device *dev); @@ -118,6 +123,7 @@ struct pcmcia_driver { struct module *owner; struct pcmcia_device_id *id_table; struct device_driver drv; + struct pcmcia_dynids dynids; }; /* driver registration */ -- cgit v1.2.3-70-g09d2