diff options
author | Simon Glass | 2020-12-22 19:30:28 -0700 |
---|---|---|
committer | Simon Glass | 2021-01-05 12:24:40 -0700 |
commit | 0fd3d91152df5bb6c5f7b9ee68f01a9a1c9a875d (patch) | |
tree | 1dbc5b936b98393e343cc99a40382b2734ac778e /drivers/reset | |
parent | 12559f5bab3e43b603dccfa6c354ffd7da03249c (diff) |
dm: Use access methods for dev/uclass private data
Most drivers use these access methods but a few do not. Update them.
In some cases the access is not permitted, so mark those with a FIXME tag
for the maintainer to check.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
Diffstat (limited to 'drivers/reset')
-rw-r--r-- | drivers/reset/reset-mediatek.c | 3 | ||||
-rw-r--r-- | drivers/reset/reset-rockchip.c | 3 | ||||
-rw-r--r-- | drivers/reset/reset-sifive.c | 3 | ||||
-rw-r--r-- | drivers/reset/reset-sunxi.c | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c index b97a21f6717..7427013ab60 100644 --- a/drivers/reset/reset-mediatek.c +++ b/drivers/reset/reset-mediatek.c @@ -14,6 +14,7 @@ #include <regmap.h> #include <reset-uclass.h> #include <syscon.h> +#include <dm/device-internal.h> #include <linux/bitops.h> #include <linux/err.h> @@ -92,7 +93,7 @@ int mediatek_reset_bind(struct udevice *pdev, u32 regofs, u32 num_regs) priv = malloc(sizeof(struct mediatek_reset_priv)); priv->regofs = regofs; priv->nr_resets = num_regs * 32; - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c index e5e9918c0c1..eeb3d2eea77 100644 --- a/drivers/reset/reset-rockchip.c +++ b/drivers/reset/reset-rockchip.c @@ -11,6 +11,7 @@ #include <linux/bitops.h> #include <linux/io.h> #include <asm/arch-rockchip/hardware.h> +#include <dm/device-internal.h> #include <dm/lists.h> /* * Each reg has 16 bits reset signal for devices @@ -121,7 +122,7 @@ int rockchip_reset_bind(struct udevice *pdev, u32 reg_offset, u32 reg_number) priv = malloc(sizeof(struct rockchip_reset_priv)); priv->reset_reg_offset = reg_offset; priv->reset_reg_num = reg_number; - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } diff --git a/drivers/reset/reset-sifive.c b/drivers/reset/reset-sifive.c index f6110d85f9f..eec840d677f 100644 --- a/drivers/reset/reset-sifive.c +++ b/drivers/reset/reset-sifive.c @@ -9,6 +9,7 @@ #include <reset-uclass.h> #include <asm/io.h> #include <dm/device_compat.h> +#include <dm/device-internal.h> #include <dm/lists.h> #include <linux/bitops.h> @@ -97,7 +98,7 @@ int sifive_reset_bind(struct udevice *dev, ulong count) } priv = malloc(sizeof(struct sifive_reset_priv)); priv->nr_reset = count; - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c index 1db321ce1fd..264337ed803 100644 --- a/drivers/reset/reset-sunxi.c +++ b/drivers/reset/reset-sunxi.c @@ -11,6 +11,7 @@ #include <malloc.h> #include <reset-uclass.h> #include <asm/io.h> +#include <dm/device-internal.h> #include <dm/lists.h> #include <linux/bitops.h> #include <linux/log2.h> @@ -113,7 +114,7 @@ int sunxi_reset_bind(struct udevice *dev, ulong count) priv = malloc(sizeof(struct sunxi_reset_priv)); priv->count = count; priv->desc = (const struct ccu_desc *)dev_get_driver_data(dev); - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } |