Commit ae7f4513087e7f7996cebc9db642917dde9ea561
1 parent
5957ac2a9f
Exists in
v2017.01-smarct4x
and in
40 other branches
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
drivers/demo/demo-shape.c
drivers/demo/demo-simple.c
drivers/gpio/sandbox.c
include/dm/device.h
... | ... | @@ -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); |
test/dm/test-fdt.c