]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: Rename struct device_id to udevice_id
authorSimon Glass <sjg@chromium.org>
Thu, 12 Jun 2014 05:29:45 +0000 (23:29 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 20 Jun 2014 17:55:18 +0000 (11:55 -0600)
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>
doc/driver-model/README.txt
drivers/core/lists.c
drivers/demo/demo-shape.c
drivers/demo/demo-simple.c
drivers/gpio/sandbox.c
include/dm/device.h
test/dm/test-fdt.c

index a5035beca6e36c0270b2b6efe9bde9bff591ed49..0b295acbf9191175a219506b8853e656faf652f8 100644 (file)
@@ -315,7 +315,7 @@ is little or no 'driver model' code to write.
 - 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
index 205b140ef3d7c9d367df75f94ad62c1510454197..9f2917f4bb266b1d396cb060c0c8355c3ed12a53 100644 (file)
@@ -94,7 +94,7 @@ int lists_bind_drivers(struct udevice *parent)
  * 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;
 
index a68cc1092cf4720e7c6dce8b3ee7775b96b511c1..3fa9c5994703d473494a4d2199ecae3e34a0c9c0 100644 (file)
@@ -111,7 +111,7 @@ static int shape_ofdata_to_platdata(struct udevice *dev)
        return 0;
 }
 
-static const struct device_id demo_shape_id[] = {
+static const struct udevice_id demo_shape_id[] = {
        { "demo-shape", 0 },
        { },
 };
index 11def86032c6b0a319dae3d4add27d061a546bce..2bcb7dfb479c4c123b3e2b875e4df4c680906290 100644 (file)
@@ -32,7 +32,7 @@ static int demo_shape_ofdata_to_platdata(struct udevice *dev)
        return demo_parse_dt(dev);
 }
 
-static const struct device_id demo_shape_id[] = {
+static const struct udevice_id demo_shape_id[] = {
        { "demo-simple", 0 },
        { },
 };
index 09cebe2286f434317f8072092a0274ac410aefbf..75ada5d3871a844935c22b1bb9557f2e3229c84f 100644 (file)
@@ -239,7 +239,7 @@ static int gpio_sandbox_probe(struct udevice *dev)
        return 0;
 }
 
-static const struct device_id sandbox_gpio_ids[] = {
+static const struct udevice_id sandbox_gpio_ids[] = {
        { .compatible = "sandbox,gpio" },
        { }
 };
index ec049824e8cf485a07d5619963e6fafe56c345c6..19f20390d79872b3ff985656d6dec0e6e03f8b0c 100644 (file)
@@ -75,11 +75,11 @@ struct udevice {
 #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 device_id {
 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);
index 6eccf111279c2bbee53417f508c6b3ed514b8156..98e3936527ea11a594f4abd215c86b9fdfaf01ba 100644 (file)
@@ -53,7 +53,7 @@ static int testfdt_drv_probe(struct udevice *dev)
        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 },