summaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r--drivers/base/bus.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index aac5b69f34..a5c9c930da 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- *
- * Under GPLv2
*/
#include <common.h>
@@ -48,9 +47,9 @@ int bus_register(struct bus_type *bus)
return 0;
}
-int device_match(struct device_d *dev, struct driver_d *drv)
+int device_match(struct device *dev, struct driver *drv)
{
- if (IS_ENABLED(CONFIG_OFDEVICE) && dev->device_node &&
+ if (IS_ENABLED(CONFIG_OFDEVICE) && dev->of_node &&
drv->of_compatible)
return of_match(dev, drv);
@@ -71,7 +70,7 @@ int device_match(struct device_d *dev, struct driver_d *drv)
return -1;
}
-int device_match_of_modalias(struct device_d *dev, struct driver_d *drv)
+int device_match_of_modalias(struct device *dev, struct driver *drv)
{
const struct platform_device_id *id = drv->id_table;
const char *of_modalias = NULL, *p;
@@ -81,10 +80,10 @@ int device_match_of_modalias(struct device_d *dev, struct driver_d *drv)
if (!device_match(dev, drv))
return 0;
- if (!id || !IS_ENABLED(CONFIG_OFDEVICE) || !dev->device_node)
+ if (!id || !IS_ENABLED(CONFIG_OFDEVICE) || !dev->of_node)
return -1;
- of_property_for_each_string(dev->device_node, "compatible", prop, compat) {
+ of_property_for_each_string(dev->of_node, "compatible", prop, compat) {
p = strchr(compat, ',');
of_modalias = p ? p + 1 : compat;