From 190086e6640d2b84626fed8324f89f86a01014ae Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Mon, 28 Mar 2022 22:24:30 -0500 Subject: device/i2c_bus: Constify i2c_busdev and i2c_link Change-Id: If795087ecdaea24ad7834dcc6d5bf6a72f2aea8f Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/63208 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Raul Rangel --- src/include/device/i2c_bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/device') diff --git a/src/include/device/i2c_bus.h b/src/include/device/i2c_bus.h index b5e77105b5b5..42f461dc9e3a 100644 --- a/src/include/device/i2c_bus.h +++ b/src/include/device/i2c_bus.h @@ -21,14 +21,14 @@ struct i2c_bus_operations { * `->dev->ops->ops_i2c_bus` or `->dev->ops->ops_smbus_bus` are * not NULL. */ -struct bus *i2c_link(struct device *); +struct bus *i2c_link(const struct device *dev); /* * Shorthand for `i2c_link(dev)->dev`. * * Returns NULL if i2c_link(dev) returns NULL. */ -static inline DEVTREE_CONST struct device *i2c_busdev(struct device *dev) +static inline DEVTREE_CONST struct device *i2c_busdev(const struct device *dev) { struct bus *const link = i2c_link(dev); return link ? link->dev : NULL; -- cgit v1.2.3