diff options
-rw-r--r-- | src/device/i2c_bus.c | 2 | ||||
-rw-r--r-- | src/include/device/i2c_bus.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/device/i2c_bus.c b/src/device/i2c_bus.c index 597a530d88..a63086cf41 100644 --- a/src/device/i2c_bus.c +++ b/src/device/i2c_bus.c @@ -6,7 +6,7 @@ #include <device/i2c_bus.h> #include <commonlib/endian.h> -struct bus *i2c_link(struct device *const dev) +struct bus *i2c_link(const struct device *const dev) { if (!dev || !dev->bus) return NULL; diff --git a/src/include/device/i2c_bus.h b/src/include/device/i2c_bus.h index b5e77105b5..42f461dc9e 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; |