Add the ability to define all slots and current slot in the VME buses bind
table.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
while((driver->bind_table[i].bus != 0) ||
(driver->bind_table[i].slot != 0)) {
- if ((bridge->num == driver->bind_table[i].bus) &&
- (num == driver->bind_table[i].slot))
- return 1;
+ if (bridge->num == driver->bind_table[i].bus) {
+ if (num == driver->bind_table[i].slot)
+ return 1;
+
+ if (driver->bind_table[i].slot == VME_SLOT_ALL)
+ return 1;
+
+ if ((driver->bind_table[i].slot == VME_SLOT_CURRENT) &&
+ (num == vme_slot_get(dev)))
+ return 1;
+ }
i++;
}
extern struct bus_type vme_bus_type;
+#define VME_SLOT_CURRENT -1
+#define VME_SLOT_ALL -2
+
struct vme_device_id {
int bus;
int slot;