]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: most: core: add a match function for the bus
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 21 Nov 2017 14:04:45 +0000 (15:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Nov 2017 08:20:34 +0000 (09:20 +0100)
This patch adds the function most_match. It is needed to accociate
registered devices and drivers with the bus.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/core.c

index 7f7d6b65d76f300a128e6750cc08f494611c46f8..ce063a1597c3f4b888910f9eafe00cff1b3eb052 100644 (file)
@@ -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,
 };
 
 /**