dm: Rename struct device_id to udevice_id
It is best to avoid having any occurence of 'struct device' in driver
model, so rename to achieve this.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index a5035be..0b295ac 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -315,7 +315,7 @@
- Moved some data from code into data structure - e.g. store a pointer to
the driver operations structure in the driver, rather than passing it
to the driver bind function.
-- Rename some structures to make them more similar to Linux (struct device
+- Rename some structures to make them more similar to Linux (struct udevice
instead of struct instance, struct platdata, etc.)
- Change the name 'core' to 'uclass', meaning U-Boot class. It seems that
this concept relates to a class of drivers (or a subsystem). We shouldn't
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 205b140..9f2917f 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -94,7 +94,7 @@
* tree error
*/
static int driver_check_compatible(const void *blob, int offset,
- const struct device_id *of_match)
+ const struct udevice_id *of_match)
{
int ret;
diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
index a68cc10..3fa9c59 100644
--- a/drivers/demo/demo-shape.c
+++ b/drivers/demo/demo-shape.c
@@ -111,7 +111,7 @@
return 0;
}
-static const struct device_id demo_shape_id[] = {
+static const struct udevice_id demo_shape_id[] = {
{ "demo-shape", 0 },
{ },
};
diff --git a/drivers/demo/demo-simple.c b/drivers/demo/demo-simple.c
index 11def86..2bcb7df 100644
--- a/drivers/demo/demo-simple.c
+++ b/drivers/demo/demo-simple.c
@@ -32,7 +32,7 @@
return demo_parse_dt(dev);
}
-static const struct device_id demo_shape_id[] = {
+static const struct udevice_id demo_shape_id[] = {
{ "demo-simple", 0 },
{ },
};
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 09cebe2..75ada5d 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -239,7 +239,7 @@
return 0;
}
-static const struct device_id sandbox_gpio_ids[] = {
+static const struct udevice_id sandbox_gpio_ids[] = {
{ .compatible = "sandbox,gpio" },
{ }
};
diff --git a/include/dm/device.h b/include/dm/device.h
index ec04982..19f2039 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -75,11 +75,11 @@
#define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED)
/**
- * struct device_id - Lists the compatible strings supported by a driver
+ * struct udevice_id - Lists the compatible strings supported by a driver
* @compatible: Compatible string
* @data: Data for this compatible string
*/
-struct device_id {
+struct udevice_id {
const char *compatible;
ulong data;
};
@@ -121,7 +121,7 @@
struct driver {
char *name;
enum uclass_id id;
- const struct device_id *of_match;
+ const struct udevice_id *of_match;
int (*bind)(struct udevice *dev);
int (*probe)(struct udevice *dev);
int (*remove)(struct udevice *dev);
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 6eccf11..98e3936 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -53,7 +53,7 @@
return 0;
}
-static const struct device_id testfdt_ids[] = {
+static const struct udevice_id testfdt_ids[] = {
{
.compatible = "denx,u-boot-fdt-test",
.data = DM_TEST_TYPE_FIRST },