Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40704 )
Change subject: i2c/designware: Constify struct device * parameter to dw_i2c_soc_dev_to_bus ......................................................................
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 furquan@google.com --- M src/drivers/i2c/designware/dw_i2c.h M src/soc/amd/picasso/i2c.c M src/soc/amd/stoneyridge/i2c.c M src/soc/intel/common/block/i2c/i2c.c 4 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/40704/1
diff --git a/src/drivers/i2c/designware/dw_i2c.h b/src/drivers/i2c/designware/dw_i2c.h index 220d2af..e309bc1 100644 --- a/src/drivers/i2c/designware/dw_i2c.h +++ b/src/drivers/i2c/designware/dw_i2c.h @@ -129,7 +129,7 @@ * -1 = failure * >=0 = logical bus number */ -int dw_i2c_soc_dev_to_bus(struct device *dev); +int dw_i2c_soc_dev_to_bus(const struct device *dev);
/* * Common device_operations implementation to initialize the i2c host diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index 22c6216..45822c2 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -58,7 +58,7 @@ } }
-int dw_i2c_soc_dev_to_bus(struct device *dev) +int dw_i2c_soc_dev_to_bus(const struct device *dev) { switch (dev->path.mmio.addr) { case APU_I2C2_BASE: diff --git a/src/soc/amd/stoneyridge/i2c.c b/src/soc/amd/stoneyridge/i2c.c index 1fdb416..852930a 100644 --- a/src/soc/amd/stoneyridge/i2c.c +++ b/src/soc/amd/stoneyridge/i2c.c @@ -64,7 +64,7 @@ } }
-int dw_i2c_soc_dev_to_bus(struct device *dev) +int dw_i2c_soc_dev_to_bus(const struct device *dev) { switch (dev->path.mmio.addr) { case I2CA_BASE_ADDRESS: diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c index 46f19fb..b9638fe 100644 --- a/src/soc/intel/common/block/i2c/i2c.c +++ b/src/soc/intel/common/block/i2c/i2c.c @@ -14,7 +14,7 @@ #include <soc/iomap.h> #include <soc/pci_devs.h>
-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);