summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/bundle.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-21 10:52:03 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-21 17:15:35 -0800
commit700001af960af35e57b701e57bd1595404dca613 (patch)
tree5bf65721fb67cf56cf1f1bac4ed75d8508e9fb9d /drivers/staging/greybus/bundle.c
parentf65fa47f28f303c84b701dadda6d4f48fb541691 (diff)
greybus: move id-matching back to core
Move id-matching back to core and the bus code where it belongs. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/bundle.c')
-rw-r--r--drivers/staging/greybus/bundle.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index fbc043998e08..4d04f09f0591 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -68,41 +68,6 @@ struct device_type greybus_bundle_type = {
.release = gb_bundle_release,
};
-static int gb_bundle_match_one_id(struct gb_bundle *bundle,
- const struct greybus_bundle_id *id)
-{
- if ((id->match_flags & GREYBUS_ID_MATCH_VENDOR) &&
- (id->vendor != bundle->intf->vendor))
- return 0;
-
- if ((id->match_flags & GREYBUS_ID_MATCH_PRODUCT) &&
- (id->product != bundle->intf->product))
- return 0;
-
- if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) &&
- (id->class != bundle->class))
- return 0;
-
- return 1;
-}
-
-const struct greybus_bundle_id *
-gb_bundle_match_id(struct gb_bundle *bundle,
- const struct greybus_bundle_id *id)
-{
- if (id == NULL)
- return NULL;
-
- for (; id->vendor || id->product || id->class || id->driver_info;
- id++) {
- if (gb_bundle_match_one_id(bundle, id))
- return id;
- }
-
- return NULL;
-}
-
-
/* XXX This could be per-host device or per-module */
static DEFINE_SPINLOCK(gb_bundles_lock);