mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
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 <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
14c018a93e
commit
921c80c52b
1 changed files with 9 additions and 0 deletions
|
@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue