From 9784a591f00134c02d152d6d07c539a136db7c12 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Sat, 21 Nov 2015 10:52:00 +0100 Subject: [PATCH] greybus: remove unique-id matching Remove unique-id matching as it does not make much sense to have a driver match a specific device serial number. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/bundle.c | 8 ++------ drivers/staging/greybus/greybus.h | 4 ---- drivers/staging/greybus/greybus_id.h | 2 -- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c index 01745f4..fbc0439 100644 --- a/drivers/staging/greybus/bundle.c +++ b/drivers/staging/greybus/bundle.c @@ -79,10 +79,6 @@ static int gb_bundle_match_one_id(struct gb_bundle *bundle, (id->product != bundle->intf->product)) return 0; - if ((id->match_flags & GREYBUS_ID_MATCH_SERIAL) && - (id->unique_id != bundle->intf->unique_id)) - return 0; - if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) && (id->class != bundle->class)) return 0; @@ -97,8 +93,8 @@ gb_bundle_match_id(struct gb_bundle *bundle, if (id == NULL) return NULL; - for (; id->vendor || id->product || id->unique_id || id->class || - id->driver_info; id++) { + for (; id->vendor || id->product || id->class || id->driver_info; + id++) { if (gb_bundle_match_one_id(bundle, id)) return id; } diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h index 4a6b235..4f8aa31 100644 --- a/drivers/staging/greybus/greybus.h +++ b/drivers/staging/greybus/greybus.h @@ -50,10 +50,6 @@ .vendor = (v), \ .product = (p), -#define GREYBUS_DEVICE_SERIAL(s) \ - .match_flags = GREYBUS_ID_MATCH_SERIAL, \ - .serial_number = (s), - /* Maximum number of CPorts */ #define CPORT_ID_MAX 4095 /* UniPro max id is 4095 */ #define CPORT_ID_BAD U16_MAX diff --git a/drivers/staging/greybus/greybus_id.h b/drivers/staging/greybus/greybus_id.h index 8e76d42..68d2e95 100644 --- a/drivers/staging/greybus/greybus_id.h +++ b/drivers/staging/greybus/greybus_id.h @@ -14,7 +14,6 @@ struct greybus_bundle_id { __u16 vendor; __u16 product; __u8 class; - __u64 unique_id; kernel_ulong_t driver_info __aligned(sizeof(kernel_ulong_t)); }; @@ -22,7 +21,6 @@ struct greybus_bundle_id { /* Used to match the greybus_bundle_id */ #define GREYBUS_ID_MATCH_VENDOR BIT(0) #define GREYBUS_ID_MATCH_PRODUCT BIT(1) -#define GREYBUS_ID_MATCH_SERIAL BIT(2) #define GREYBUS_ID_MATCH_CLASS BIT(3) #endif /* __LINUX_GREYBUS_ID_H */ -- 2.7.4