summaryrefslogtreecommitdiff
path: root/include/dm/uclass.h
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-05-22 10:43:05 (GMT)
committerTom Rini <trini@ti.com>2014-05-27 14:21:32 (GMT)
commit54c5d08a09e631f88738db54c75395c6457c2157 (patch)
tree989241d18408f19062618bc380ef5948154f2334 /include/dm/uclass.h
parent9665fa8f9e1488209d5e01d0792c243e0a220c5a (diff)
downloadu-boot-54c5d08a09e631f88738db54c75395c6457c2157.tar.xz
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 'include/dm/uclass.h')
-rw-r--r--include/dm/uclass.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index cd23cfe..931d9c0 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -37,7 +37,7 @@ struct uclass {
struct list_head sibling_node;
};
-struct device;
+struct udevice;
/**
* struct uclass_driver - Driver for the uclass
@@ -65,10 +65,10 @@ struct device;
struct uclass_driver {
const char *name;
enum uclass_id id;
- int (*post_bind)(struct device *dev);
- int (*pre_unbind)(struct device *dev);
- int (*post_probe)(struct device *dev);
- int (*pre_remove)(struct device *dev);
+ int (*post_bind)(struct udevice *dev);
+ int (*pre_unbind)(struct udevice *dev);
+ int (*post_probe)(struct udevice *dev);
+ int (*pre_remove)(struct udevice *dev);
int (*init)(struct uclass *class);
int (*destroy)(struct uclass *class);
int priv_auto_alloc_size;
@@ -101,7 +101,7 @@ int uclass_get(enum uclass_id key, struct uclass **ucp);
* @ucp: Returns pointer to uclass (there is only one per for each ID)
* @return 0 if OK, -ve on error
*/
-int uclass_get_device(enum uclass_id id, int index, struct device **ucp);
+int uclass_get_device(enum uclass_id id, int index, struct udevice **ucp);
/**
* uclass_first_device() - Get the first device in a uclass
@@ -110,7 +110,7 @@ int uclass_get_device(enum uclass_id id, int index, struct device **ucp);
* @devp: Returns pointer to the first device in that uclass, or NULL if none
* @return 0 if OK (found or not found), -1 on error
*/
-int uclass_first_device(enum uclass_id id, struct device **devp);
+int uclass_first_device(enum uclass_id id, struct udevice **devp);
/**
* uclass_next_device() - Get the next device in a uclass
@@ -119,7 +119,7 @@ int uclass_first_device(enum uclass_id id, struct device **devp);
* to the next device in the same uclass, or NULL if none
* @return 0 if OK (found or not found), -1 on error
*/
-int uclass_next_device(struct device **devp);
+int uclass_next_device(struct udevice **devp);
/**
* uclass_foreach_dev() - Helper function to iteration through devices
@@ -127,7 +127,7 @@ int uclass_next_device(struct device **devp);
* This creates a for() loop which works through the available devices in
* a uclass in order from start to end.
*
- * @pos: struct device * to hold the current device. Set to NULL when there
+ * @pos: struct udevice * to hold the current device. Set to NULL when there
* are no more devices.
* uc: uclass to scan
*/