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>
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index 0b8668d..f7b5a1a 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -113,7 +113,7 @@
static int ast_wdt_probe(struct udevice *dev)
{
- debug("%s() wdt%u\n", __func__, dev->seq);
+ debug("%s() wdt%u\n", __func__, dev_seq(dev));
ast_wdt_stop(dev);
return 0;
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 10d9974..9e0d89b 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -108,7 +108,7 @@
if (!priv->regs)
return -EINVAL;
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index 06de5bd..966d010 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -223,7 +223,7 @@
*/
static int cdns_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index db9a7d7..ca2bc7c 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -242,7 +242,7 @@
return -EINVAL;
priv->wdt_trgr_pattern = 0x1234;
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 35e25d4..167af90 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -158,7 +158,7 @@
struct orion_wdt_priv *priv = dev_get_priv(dev);
int ret;
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
orion_wdt_stop(dev);
ret = clk_get_by_name(dev, "fixed", &priv->clk);
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 7538215..df68adb 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -88,7 +88,7 @@
static int sbsa_gwdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u (sbsa-gwdt)\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u (sbsa-gwdt)\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 3249220..291aad7 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -105,7 +105,7 @@
static int sp805_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u (sp805-wdt)\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u (sp805-wdt)\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/tangier_wdt.c b/drivers/watchdog/tangier_wdt.c
index 358a9b9..bdc6559 100644
--- a/drivers/watchdog/tangier_wdt.c
+++ b/drivers/watchdog/tangier_wdt.c
@@ -80,7 +80,7 @@
static int tangier_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index d71ae6c..1687a45 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -85,7 +85,7 @@
static int xlnx_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c
index 49f2043..9137d87 100644
--- a/drivers/watchdog/xilinx_wwdt.c
+++ b/drivers/watchdog/xilinx_wwdt.c
@@ -128,7 +128,7 @@
struct xlnx_wwdt_plat *plat = dev_get_plat(dev);
struct xlnx_wwdt_priv *wdt = dev_get_priv(dev);
- dev_dbg(dev, "%s: Probing wdt%u\n", __func__, dev->seq);
+ dev_dbg(dev, "%s: Probing wdt%u\n", __func__, dev_seq(dev));
ret = regmap_init_mem(dev_ofnode(dev), &wdt->regs);
if (ret) {