diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-16 21:20:07 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-18 20:32:21 -0700 |
commit | 8b85dfc675f12de8d04126c07f3c796965b990c2 (patch) | |
tree | 9b8d6df956b02734a1b910b0a4c072e1e80b672a /drivers/i2c/lpc32xx_i2c.c | |
parent | 0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff) | |
download | u-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.zip u-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.tar.gz u-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.tar.bz2 |
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/i2c/lpc32xx_i2c.c')
-rw-r--r-- | drivers/i2c/lpc32xx_i2c.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c index e321d4b..ad11e97 100644 --- a/drivers/i2c/lpc32xx_i2c.c +++ b/drivers/i2c/lpc32xx_i2c.c @@ -282,7 +282,11 @@ U_BOOT_I2C_ADAP_COMPLETE(lpc32xx_2, lpc32xx_i2c_init, NULL, static int lpc32xx_i2c_probe(struct udevice *bus) { struct lpc32xx_i2c_dev *dev = dev_get_plat(bus); - bus->seq = dev->index; + + /* + * FIXME: This is not permitted + * dev_seq(bus) = dev->index; + */ __i2c_init(dev->base, dev->speed, 0, dev->index); return 0; |