From 8b85dfc675f12de8d04126c07f3c796965b990c2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 16 Dec 2020 21:20:07 -0700 Subject: 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 --- drivers/video/vidconsole-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/video/vidconsole-uclass.c') diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index a6b7d40d96..ceb4744354 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -606,9 +606,9 @@ static int vidconsole_post_probe(struct udevice *dev) if (!priv->tab_width_frac) priv->tab_width_frac = VID_TO_POS(priv->x_charsize) * 8; - if (dev->seq) { + if (dev_seq(dev)) { snprintf(sdev->name, sizeof(sdev->name), "vidconsole%d", - dev->seq); + dev_seq(dev)); } else { strcpy(sdev->name, "vidconsole"); } -- cgit v1.2.3