diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-22 19:30:30 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-05 12:24:40 -0700 |
commit | fb8c9fb3fa422314d53516ba30f280be1e7216f9 (patch) | |
tree | 8d35bd5f521f515995ec85d9276d39c917b7b6b2 /drivers | |
parent | 89ba6d553572fe9177ae472170b8373e49f97953 (diff) | |
download | u-boot-fb8c9fb3fa422314d53516ba30f280be1e7216f9.zip u-boot-fb8c9fb3fa422314d53516ba30f280be1e7216f9.tar.gz u-boot-fb8c9fb3fa422314d53516ba30f280be1e7216f9.tar.bz2 |
dm: core: Rename the priv/plat members
These are supposed to be private to driver model, not accessed by any code
outside. Add a trailing underscore to indicate this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/core/device.c | 24 | ||||
-rw-r--r-- | drivers/core/uclass.c | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 261c3b2..a4c8310 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -514,7 +514,7 @@ void *dev_get_plat(const struct udevice *dev) return NULL; } - return dev->plat; + return dev->plat_; } void *dev_get_parent_plat(const struct udevice *dev) @@ -524,7 +524,7 @@ void *dev_get_parent_plat(const struct udevice *dev) return NULL; } - return dev->parent_plat; + return dev->parent_plat_; } void *dev_get_uclass_plat(const struct udevice *dev) @@ -534,7 +534,7 @@ void *dev_get_uclass_plat(const struct udevice *dev) return NULL; } - return dev->uclass_plat; + return dev->uclass_plat_; } void *dev_get_priv(const struct udevice *dev) @@ -544,7 +544,7 @@ void *dev_get_priv(const struct udevice *dev) return NULL; } - return dev->priv; + return dev->priv_; } void *dev_get_uclass_priv(const struct udevice *dev) @@ -554,7 +554,7 @@ void *dev_get_uclass_priv(const struct udevice *dev) return NULL; } - return dev->uclass_priv; + return dev->uclass_priv_; } void *dev_get_parent_priv(const struct udevice *dev) @@ -564,7 +564,7 @@ void *dev_get_parent_priv(const struct udevice *dev) return NULL; } - return dev->parent_priv; + return dev->parent_priv_; } static int device_get_device_tail(struct udevice *dev, int ret, @@ -966,32 +966,32 @@ int device_set_name(struct udevice *dev, const char *name) void dev_set_priv(struct udevice *dev, void *priv) { - dev->priv = priv; + dev->priv_ = priv; } void dev_set_parent_priv(struct udevice *dev, void *parent_priv) { - dev->parent_priv = parent_priv; + dev->parent_priv_ = parent_priv; } void dev_set_uclass_priv(struct udevice *dev, void *uclass_priv) { - dev->uclass_priv = uclass_priv; + dev->uclass_priv_ = uclass_priv; } void dev_set_plat(struct udevice *dev, void *plat) { - dev->plat = plat; + dev->plat_ = plat; } void dev_set_parent_plat(struct udevice *dev, void *parent_plat) { - dev->parent_plat = parent_plat; + dev->parent_plat_ = parent_plat; } void dev_set_uclass_plat(struct udevice *dev, void *uclass_plat) { - dev->uclass_plat = uclass_plat; + dev->uclass_plat_ = uclass_plat; } #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index e845f60..f60bc9a 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -165,12 +165,12 @@ const char *uclass_get_name(enum uclass_id id) void *uclass_get_priv(const struct uclass *uc) { - return uc->priv; + return uc->priv_; } void uclass_set_priv(struct uclass *uc, void *priv) { - uc->priv = priv; + uc->priv_ = priv; } enum uclass_id uclass_get_by_name(const char *name) |