summaryrefslogtreecommitdiff
path: root/include/dm/read.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-01-27 18:49:36 +0300
committerSimon Glass <sjg@chromium.org>2020-02-06 05:33:45 +0300
commitfc347fbdd44a01b1aba6283dec56c1374baca383 (patch)
treedca9fbbe065e827cfd27d2e668b3a080436cea43 /include/dm/read.h
parentf5cc89a82a9990ba9805ff5800c0872b891533ce (diff)
downloadu-boot-fc347fbdd44a01b1aba6283dec56c1374baca383.tar.xz
dm: core: Use const where possible in device.h
Update this header file to use const devices where possible, to permit callers to also use const. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/read.h')
-rw-r--r--include/dm/read.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/dm/read.h b/include/dm/read.h
index d37fcb504d..f1c1553f80 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -33,12 +33,12 @@ static inline const struct device_node *dev_np(struct udevice *dev)
* @dev: device to check
* @return reference of the the device's DT node
*/
-static inline ofnode dev_ofnode(struct udevice *dev)
+static inline ofnode dev_ofnode(const struct udevice *dev)
{
return dev->node;
}
-static inline bool dev_of_valid(struct udevice *dev)
+static inline bool dev_of_valid(const struct udevice *dev)
{
return ofnode_valid(dev_ofnode(dev));
}