Commit ae7f4513087e7f7996cebc9db642917dde9ea561

Authored by Simon Glass
1 parent 5957ac2a9f

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>

Showing 7 changed files with 9 additions and 9 deletions Side-by-side Diff

doc/driver-model/README.txt
... ... @@ -315,7 +315,7 @@
315 315 - Moved some data from code into data structure - e.g. store a pointer to
316 316 the driver operations structure in the driver, rather than passing it
317 317 to the driver bind function.
318   -- Rename some structures to make them more similar to Linux (struct device
  318 +- Rename some structures to make them more similar to Linux (struct udevice
319 319 instead of struct instance, struct platdata, etc.)
320 320 - Change the name 'core' to 'uclass', meaning U-Boot class. It seems that
321 321 this concept relates to a class of drivers (or a subsystem). We shouldn't
drivers/core/lists.c
... ... @@ -94,7 +94,7 @@
94 94 * tree error
95 95 */
96 96 static int driver_check_compatible(const void *blob, int offset,
97   - const struct device_id *of_match)
  97 + const struct udevice_id *of_match)
98 98 {
99 99 int ret;
100 100  
drivers/demo/demo-shape.c
... ... @@ -111,7 +111,7 @@
111 111 return 0;
112 112 }
113 113  
114   -static const struct device_id demo_shape_id[] = {
  114 +static const struct udevice_id demo_shape_id[] = {
115 115 { "demo-shape", 0 },
116 116 { },
117 117 };
drivers/demo/demo-simple.c
... ... @@ -32,7 +32,7 @@
32 32 return demo_parse_dt(dev);
33 33 }
34 34  
35   -static const struct device_id demo_shape_id[] = {
  35 +static const struct udevice_id demo_shape_id[] = {
36 36 { "demo-simple", 0 },
37 37 { },
38 38 };
drivers/gpio/sandbox.c
... ... @@ -239,7 +239,7 @@
239 239 return 0;
240 240 }
241 241  
242   -static const struct device_id sandbox_gpio_ids[] = {
  242 +static const struct udevice_id sandbox_gpio_ids[] = {
243 243 { .compatible = "sandbox,gpio" },
244 244 { }
245 245 };
... ... @@ -75,11 +75,11 @@
75 75 #define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED)
76 76  
77 77 /**
78   - * struct device_id - Lists the compatible strings supported by a driver
  78 + * struct udevice_id - Lists the compatible strings supported by a driver
79 79 * @compatible: Compatible string
80 80 * @data: Data for this compatible string
81 81 */
82   -struct device_id {
  82 +struct udevice_id {
83 83 const char *compatible;
84 84 ulong data;
85 85 };
... ... @@ -121,7 +121,7 @@
121 121 struct driver {
122 122 char *name;
123 123 enum uclass_id id;
124   - const struct device_id *of_match;
  124 + const struct udevice_id *of_match;
125 125 int (*bind)(struct udevice *dev);
126 126 int (*probe)(struct udevice *dev);
127 127 int (*remove)(struct udevice *dev);
... ... @@ -53,7 +53,7 @@
53 53 return 0;
54 54 }
55 55  
56   -static const struct device_id testfdt_ids[] = {
  56 +static const struct udevice_id testfdt_ids[] = {
57 57 {
58 58 .compatible = "denx,u-boot-fdt-test",
59 59 .data = DM_TEST_TYPE_FIRST },