summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/tegra186_gpio.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-22 19:30:28 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:24:40 -0700
commit0fd3d91152df5bb6c5f7b9ee68f01a9a1c9a875d (patch)
tree1dbc5b936b98393e343cc99a40382b2734ac778e /drivers/gpio/tegra186_gpio.c
parent12559f5bab3e43b603dccfa6c354ffd7da03249c (diff)
downloadu-boot-0fd3d91152df5bb6c5f7b9ee68f01a9a1c9a875d.tar.gz
u-boot-0fd3d91152df5bb6c5f7b9ee68f01a9a1c9a875d.tar.xz
u-boot-0fd3d91152df5bb6c5f7b9ee68f01a9a1c9a875d.zip
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/gpio/tegra186_gpio.c')
-rw-r--r--drivers/gpio/tegra186_gpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c
index cd1fb65a55..82dcaf9631 100644
--- a/drivers/gpio/tegra186_gpio.c
+++ b/drivers/gpio/tegra186_gpio.c
@@ -34,7 +34,7 @@ struct tegra186_gpio_plat {
static uint32_t *tegra186_gpio_reg(struct udevice *dev, uint32_t reg,
uint32_t gpio)
{
- struct tegra186_gpio_plat *plat = dev->plat;
+ struct tegra186_gpio_plat *plat = dev_get_plat(dev);
uint32_t index = (reg + (gpio * TEGRA186_GPIO_PER_GPIO_STRIDE)) / 4;
return &(plat->regs[index]);
@@ -166,7 +166,7 @@ static const struct dm_gpio_ops tegra186_gpio_ops = {
*/
static int tegra186_gpio_bind(struct udevice *parent)
{
- struct tegra186_gpio_plat *parent_plat = parent->plat;
+ struct tegra186_gpio_plat *parent_plat = dev_get_plat(parent);
struct tegra186_gpio_ctlr_data *ctlr_data =
(struct tegra186_gpio_ctlr_data *)dev_get_driver_data(parent);
uint32_t *regs;
@@ -201,7 +201,7 @@ static int tegra186_gpio_bind(struct udevice *parent)
static int tegra186_gpio_probe(struct udevice *dev)
{
- struct tegra186_gpio_plat *plat = dev->plat;
+ struct tegra186_gpio_plat *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
/* Only child devices have ports */