Commit a37b0dad authored by Martyn Welch's avatar Martyn Welch Committed by Greg Kroah-Hartman
Browse files

Staging: vme: Extend VME core probing for special matches



Add the ability to define all slots and current slot in the VME buses bind
table.

Signed-off-by: default avatarMartyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent df455175
Loading
Loading
Loading
Loading
+11 −3
Original line number Original line Diff line number Diff line
@@ -1302,9 +1302,17 @@ static int vme_bus_match(struct device *dev, struct device_driver *drv)
	while((driver->bind_table[i].bus != 0) ||
	while((driver->bind_table[i].bus != 0) ||
		(driver->bind_table[i].slot != 0)) {
		(driver->bind_table[i].slot != 0)) {


		if ((bridge->num == driver->bind_table[i].bus) &&
		if (bridge->num == driver->bind_table[i].bus) {
			(num == driver->bind_table[i].slot))
			if (num == driver->bind_table[i].slot)
				return 1;
				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++;
		i++;
	}
	}


+3 −0
Original line number Original line Diff line number Diff line
@@ -79,6 +79,9 @@ struct vme_resource {


extern struct bus_type vme_bus_type;
extern struct bus_type vme_bus_type;


#define VME_SLOT_CURRENT	-1
#define VME_SLOT_ALL		-2

struct vme_device_id {
struct vme_device_id {
	int bus;
	int bus;
	int slot;
	int slot;