summaryrefslogtreecommitdiff
path: root/drivers/mmc/fsl_esdhc_imx.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-16 21:20:07 -0700
committerSimon Glass <sjg@chromium.org>2020-12-18 20:32:21 -0700
commit8b85dfc675f12de8d04126c07f3c796965b990c2 (patch)
tree9b8d6df956b02734a1b910b0a4c072e1e80b672a /drivers/mmc/fsl_esdhc_imx.c
parent0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff)
downloadu-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.tar.gz
u-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.tar.bz2
u-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.zip
dm: Avoid accessing seq directly
At present various drivers etc. access the device's 'seq' member directly. This makes it harder to change the meaning of that member. Change access to go through a function instead. The drivers/i2c/lpc32xx_i2c.c file is left unchanged for now. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc/fsl_esdhc_imx.c')
-rw-r--r--drivers/mmc/fsl_esdhc_imx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 6bf8695e45..34c2dceb18 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1542,7 +1542,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
* work as expected.
*/
- init_clk_usdhc(dev->seq);
+ init_clk_usdhc(dev_seq(dev));
#if CONFIG_IS_ENABLED(CLK)
/* Assigned clock already set clock */
@@ -1559,7 +1559,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
priv->sdhc_clk = clk_get_rate(&priv->per_clk);
#else
- priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev->seq);
+ priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev_seq(dev));
if (priv->sdhc_clk <= 0) {
dev_err(dev, "Unable to get clk for %s\n", dev->name);
return -EINVAL;