summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-04-24 21:33:02 -0700
committerFurquan Shaikh <furquan@google.com>2020-04-28 19:39:46 +0000
commit00296ea96f469c0ed35b813a9810272b7530df58 (patch)
treedd913649a9106b2f08aa81b33ef0bcc0cb995ebc /src/soc
parent5b5c233e909b67482908b0f32452c7cbcd6fae0e (diff)
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40704 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/picasso/i2c.c2
-rw-r--r--src/soc/amd/stoneyridge/i2c.c2
-rw-r--r--src/soc/intel/common/block/i2c/i2c.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c
index 8ba05aa9de..25dab397c0 100644
--- a/src/soc/amd/picasso/i2c.c
+++ b/src/soc/amd/picasso/i2c.c
@@ -63,7 +63,7 @@ const char *i2c_acpi_name(const struct device *dev)
}
}
-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 1fdb41691c..852930a88d 100644
--- a/src/soc/amd/stoneyridge/i2c.c
+++ b/src/soc/amd/stoneyridge/i2c.c
@@ -64,7 +64,7 @@ const char *i2c_acpi_name(const struct device *dev)
}
}
-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 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 <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);