diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/core/device.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 73c99d1a65..a9e5906e7c 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -442,7 +442,7 @@ fail: return ret; } -void *dev_get_platdata(struct udevice *dev) +void *dev_get_platdata(const struct udevice *dev) { if (!dev) { dm_warn("%s: null device\n", __func__); @@ -452,7 +452,7 @@ void *dev_get_platdata(struct udevice *dev) return dev->platdata; } -void *dev_get_parent_platdata(struct udevice *dev) +void *dev_get_parent_platdata(const struct udevice *dev) { if (!dev) { dm_warn("%s: null device\n", __func__); @@ -462,7 +462,7 @@ void *dev_get_parent_platdata(struct udevice *dev) return dev->parent_platdata; } -void *dev_get_uclass_platdata(struct udevice *dev) +void *dev_get_uclass_platdata(const struct udevice *dev) { if (!dev) { dm_warn("%s: null device\n", __func__); @@ -472,7 +472,7 @@ void *dev_get_uclass_platdata(struct udevice *dev) return dev->uclass_platdata; } -void *dev_get_priv(struct udevice *dev) +void *dev_get_priv(const struct udevice *dev) { if (!dev) { dm_warn("%s: null device\n", __func__); @@ -482,7 +482,7 @@ void *dev_get_priv(struct udevice *dev) return dev->priv; } -void *dev_get_uclass_priv(struct udevice *dev) +void *dev_get_uclass_priv(const struct udevice *dev) { if (!dev) { dm_warn("%s: null device\n", __func__); @@ -492,7 +492,7 @@ void *dev_get_uclass_priv(struct udevice *dev) return dev->uclass_priv; } -void *dev_get_parent_priv(struct udevice *dev) +void *dev_get_parent_priv(const struct udevice *dev) { if (!dev) { dm_warn("%s: null device\n", __func__); @@ -681,17 +681,17 @@ int device_find_next_child(struct udevice **devp) return 0; } -struct udevice *dev_get_parent(struct udevice *child) +struct udevice *dev_get_parent(const struct udevice *child) { return child->parent; } -ulong dev_get_driver_data(struct udevice *dev) +ulong dev_get_driver_data(const struct udevice *dev) { return dev->driver_data; } -const void *dev_get_driver_ops(struct udevice *dev) +const void *dev_get_driver_ops(const struct udevice *dev) { if (!dev || !dev->driver->ops) return NULL; @@ -699,12 +699,12 @@ const void *dev_get_driver_ops(struct udevice *dev) return dev->driver->ops; } -enum uclass_id device_get_uclass_id(struct udevice *dev) +enum uclass_id device_get_uclass_id(const struct udevice *dev) { return dev->uclass->uc_drv->id; } -const char *dev_get_uclass_name(struct udevice *dev) +const char *dev_get_uclass_name(const struct udevice *dev) { if (!dev) return NULL; @@ -712,7 +712,7 @@ const char *dev_get_uclass_name(struct udevice *dev) return dev->uclass->uc_drv->name; } -bool device_has_children(struct udevice *dev) +bool device_has_children(const struct udevice *dev) { return !list_empty(&dev->child_head); } |