From 921c80c52b7440a0f5c5c542d40a3295d525276b Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Tue, 21 Nov 2017 15:04:45 +0100 Subject: [PATCH] staging: most: core: add a match function for the bus This patch adds the function most_match. It is needed to accociate registered devices and drivers with the bus. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c index 7f7d6b6..ce063a1 100644 --- a/drivers/staging/most/core.c +++ b/drivers/staging/most/core.c @@ -756,11 +756,20 @@ static const struct attribute_group *aim_attr_groups[] = { * ___C O R E___ */ +int most_match(struct device *dev, struct device_driver *drv) +{ + if (!strcmp(dev_name(dev), "most")) + return 0; + else + return 1; +} + /** * Instantiation of the MOST bus */ static struct bus_type most_bus = { .name = "most", + .match = most_match, }; /** -- 2.7.4