aboutsummaryrefslogtreecommitdiffstats
path: root/include/dm/device.h
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 /include/dm/device.h
parent0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff)
downloadu-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.tar.gz
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 'include/dm/device.h')
-rw-r--r--include/dm/device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index ed80ae44940..7ada7200e3d 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -182,6 +182,11 @@ static inline bool dev_has_of_node(struct udevice *dev)
return ofnode_valid(dev->node);
}
+static inline int dev_seq(const struct udevice *dev)
+{
+ return dev->seq;
+}
+
/**
* struct udevice_id - Lists the compatible strings supported by a driver
* @compatible: Compatible string