Commit 9784a591 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 358e9400
......@@ -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;
}
......
......@@ -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
......
......@@ -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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment