[PATCH 11/50] staging: most: core: add a match function for the bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 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 d8e3b88..dbd7258 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -762,11 +762,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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux