From 00296ea96f469c0ed35b813a9810272b7530df58 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 24 Apr 2020 21:33:02 -0700 Subject: i2c/designware: Constify struct device * parameter to dw_i2c_soc_dev_to_bus dw_i2c_soc_dev_to_bus() does not need to modify the device structure. Thus, this change makes the struct device * parameter to dw_i2c_soc_dev_to_bus as const. Change-Id: Ibf5c8d8127dff2ab2ccbd1f6b4f553e98e81955f Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/40704 Reviewed-by: HAOUAS Elyes Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/i2c/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c index 46f19fb5eb..b9638fe242 100644 --- a/src/soc/intel/common/block/i2c/i2c.c +++ b/src/soc/intel/common/block/i2c/i2c.c @@ -14,7 +14,7 @@ #include #include -int dw_i2c_soc_dev_to_bus(struct device *dev) +int dw_i2c_soc_dev_to_bus(const struct device *dev) { pci_devfn_t devfn = dev->path.pci.devfn; return dw_i2c_soc_devfn_to_bus(devfn); -- cgit v1.2.3