summaryrefslogtreecommitdiffstats
path: root/doc/driver-model
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-05-22 12:43:05 +0200
committerTom Rini <trini@ti.com>2014-05-27 10:21:32 -0400
commit54c5d08a09e631f88738db54c75395c6457c2157 (patch)
tree989241d18408f19062618bc380ef5948154f2334 /doc/driver-model
parent9665fa8f9e1488209d5e01d0792c243e0a220c5a (diff)
downloadtalos-obmc-uboot-54c5d08a09e631f88738db54c75395c6457c2157.tar.gz
talos-obmc-uboot-54c5d08a09e631f88738db54c75395c6457c2157.zip
dm: rename device struct to udevice
using UBI and DM together leads in compiler error, as both define a "struct device", so rename "struct device" in include/dm/device.h to "struct udevice", as we use linux code (MTD/UBI/UBIFS some USB code,...) and cannot change the linux "struct device" Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'doc/driver-model')
-rw-r--r--doc/driver-model/README.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index e0b395a618..dcecb9a8c0 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -122,7 +122,7 @@ What is going on?
Let's start at the top. The demo command is in common/cmd_demo.c. It does
the usual command procesing and then:
- struct device *demo_dev;
+ struct udevice *demo_dev;
ret = uclass_get_device(UCLASS_DEMO, devnum, &demo_dev);
@@ -147,7 +147,7 @@ this particular device may use one or other of them.
The code for demo_hello() is in drivers/demo/demo-uclass.c:
-int demo_hello(struct device *dev, int ch)
+int demo_hello(struct udevice *dev, int ch)
{
const struct demo_ops *ops = device_get_ops(dev);
@@ -160,7 +160,7 @@ int demo_hello(struct device *dev, int ch)
As you can see it just calls the relevant driver method. One of these is
in drivers/demo/demo-simple.c:
-static int simple_hello(struct device *dev, int ch)
+static int simple_hello(struct udevice *dev, int ch)
{
const struct dm_demo_pdata *pdata = dev_get_platdata(dev);
@@ -321,7 +321,7 @@ instead of struct instance, struct platdata, etc.)
this concept relates to a class of drivers (or a subsystem). We shouldn't
use 'class' since it is a C++ reserved word, so U-Boot class (uclass) seems
better than 'core'.
-- Remove 'struct driver_instance' and just use a single 'struct device'.
+- Remove 'struct driver_instance' and just use a single 'struct udevice'.
This removes a level of indirection that doesn't seem necessary.
- Built in device tree support, to avoid the need for platdata
- Removed the concept of driver relocation, and just make it possible for
OpenPOWER on IntegriCloud