Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40707 )
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
drivers/i2c: Constify struct device * param to i2c fill ssdt callback
This change makes the struct device * param to callback function called by i2c_generic_fill_ssdt() as const. This is in preparation to make struct device * param to fill_ssdt as const.
Change-Id: I7556b672a7b0172ded44747af394f5b32b6209aa Signed-off-by: Furquan Shaikh furquan@google.com --- M src/drivers/i2c/generic/chip.h M src/drivers/i2c/generic/generic.c M src/drivers/i2c/hid/hid.c M src/drivers/net/r8168.c 4 files changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/40707/1
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h index ae7c0b4..44b5f1e 100644 --- a/src/drivers/i2c/generic/chip.h +++ b/src/drivers/i2c/generic/chip.h @@ -78,6 +78,7 @@ */ void i2c_generic_fill_ssdt(struct device *dev, void (*callback)(struct device *dev), + void (*callback)(const struct device *dev), struct drivers_i2c_generic_config *config);
#endif /* __I2C_GENERIC_CHIP_H__ */ diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 0466a6f..c3ffd5d 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -45,6 +45,7 @@
void i2c_generic_fill_ssdt(struct device *dev, void (*callback)(struct device *dev), + void (*callback)(const struct device *dev), struct drivers_i2c_generic_config *config) { const char *scope = acpi_device_scope(dev); diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c index de43eb9..0cb28bb 100644 --- a/src/drivers/i2c/hid/hid.c +++ b/src/drivers/i2c/hid/hid.c @@ -10,7 +10,7 @@ #include <console/console.h>
#if CONFIG(HAVE_ACPI_TABLES) -static void i2c_hid_fill_dsm(struct device *dev) +static void i2c_hid_fill_dsm(const struct device *dev) { struct drivers_i2c_hid_config *config = dev->chip_info; struct dsm_i2c_hid_config dsm_config = { diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c index c547f17..b904586 100644 --- a/src/drivers/net/r8168.c +++ b/src/drivers/net/r8168.c @@ -306,7 +306,7 @@
#if CONFIG(HAVE_ACPI_TABLES) #define R8168_ACPI_HID "R8168" -static void r8168_net_fill_ssdt(struct device *dev) +static void r8168_net_fill_ssdt(const struct device *dev) { struct drivers_net_config *config = dev->chip_info; const char *path = acpi_device_path(dev->bus->dev);
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40707 )
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40707/1/src/drivers/net/r8168.c File src/drivers/net/r8168.c:
https://review.coreboot.org/c/coreboot/+/40707/1/src/drivers/net/r8168.c@309 PS1, Line 309: const Wrong file.
Hello Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40707
to look at the new patch set (#2).
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
drivers/i2c: Constify struct device * param to i2c fill ssdt callback
This change makes the struct device * param to callback function called by i2c_generic_fill_ssdt() as const. This is in preparation to make struct device * param to fill_ssdt as const.
Change-Id: I7556b672a7b0172ded44747af394f5b32b6209aa Signed-off-by: Furquan Shaikh furquan@google.com --- M src/drivers/i2c/generic/chip.h M src/drivers/i2c/generic/generic.c M src/drivers/i2c/hid/hid.c 3 files changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/40707/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40707 )
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40707/1/src/drivers/net/r8168.c File src/drivers/net/r8168.c:
https://review.coreboot.org/c/coreboot/+/40707/1/src/drivers/net/r8168.c@309 PS1, Line 309: const
Wrong file.
Done
Hello build bot (Jenkins), Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40707
to look at the new patch set (#4).
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
drivers/i2c: Constify struct device * param to i2c fill ssdt callback
This change makes the struct device * param to callback function called by i2c_generic_fill_ssdt() as const. This is in preparation to make struct device * param to fill_ssdt as const.
Change-Id: I7556b672a7b0172ded44747af394f5b32b6209aa Signed-off-by: Furquan Shaikh furquan@google.com --- M src/drivers/i2c/generic/chip.h M src/drivers/i2c/generic/generic.c M src/drivers/i2c/hid/hid.c 3 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/40707/4
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40707 )
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
Patch Set 7: Code-Review+2
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40707 )
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
Patch Set 7: Code-Review+2
Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40707 )
Change subject: drivers/i2c: Constify struct device * param to i2c fill ssdt callback ......................................................................
drivers/i2c: Constify struct device * param to i2c fill ssdt callback
This change makes the struct device * param to callback function called by i2c_generic_fill_ssdt() as const. This is in preparation to make struct device * param to fill_ssdt as const.
Change-Id: I7556b672a7b0172ded44747af394f5b32b6209aa Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/40707 Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/drivers/i2c/generic/chip.h M src/drivers/i2c/generic/generic.c M src/drivers/i2c/hid/hid.c 3 files changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved HAOUAS Elyes: Looks good to me, approved
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h index ae7c0b4..b167b71 100644 --- a/src/drivers/i2c/generic/chip.h +++ b/src/drivers/i2c/generic/chip.h @@ -77,7 +77,7 @@ * config: Pointer to drivers_i2c_generic_config structure */ void i2c_generic_fill_ssdt(struct device *dev, - void (*callback)(struct device *dev), + void (*callback)(const struct device *dev), struct drivers_i2c_generic_config *config);
#endif /* __I2C_GENERIC_CHIP_H__ */ diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 0466a6f..38fcfdc 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -44,7 +44,7 @@ }
void i2c_generic_fill_ssdt(struct device *dev, - void (*callback)(struct device *dev), + void (*callback)(const struct device *dev), struct drivers_i2c_generic_config *config) { const char *scope = acpi_device_scope(dev); diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c index de43eb9..0cb28bb 100644 --- a/src/drivers/i2c/hid/hid.c +++ b/src/drivers/i2c/hid/hid.c @@ -10,7 +10,7 @@ #include <console/console.h>
#if CONFIG(HAVE_ACPI_TABLES) -static void i2c_hid_fill_dsm(struct device *dev) +static void i2c_hid_fill_dsm(const struct device *dev) { struct drivers_i2c_hid_config *config = dev->chip_info; struct dsm_i2c_hid_config dsm_config = {