greybus: remove unique-id matching
authorJohan Hovold <johan@hovoldconsulting.com>
Sat, 21 Nov 2015 09:52:00 +0000 (10:52 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Sun, 22 Nov 2015 01:15:35 +0000 (17:15 -0800)
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 <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/bundle.c
drivers/staging/greybus/greybus.h
drivers/staging/greybus/greybus_id.h

index 01745f40f6e6606e9f827397d6d55ab1342b2bbe..fbc043998e0897c6980cb6d24fc983935ae8fead 100644 (file)
@@ -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;
        }
index 4a6b235284906a772d2325fba2e974fe555f6212..4f8aa318d2abbb64043bcf13aa27285511438d28 100644 (file)
        .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
index 8e76d4218c14b0093905c5a63ab447425c67fe72..68d2e959a410198ded160f0b691a9376966833c3 100644 (file)
@@ -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 */