Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40706 )
Change subject: ec/lenovo/h8: Constify struct device * parameter to h8_has_* functions ......................................................................
ec/lenovo/h8: Constify struct device * parameter to h8_has_* functions
h8_has_bdc() and h8_has_wwan() do not need to modify the device structure. Hence, this change makes the struct device * parameter to these functions as const.
This is being done in preparation to make struct device * parameter to fill_ssdt as const.
Change-Id: Id3d65d2de7b5161b0e7cff26055c00d5dae967dc Signed-off-by: Furquan Shaikh furquan@google.com --- M src/drivers/net/r8168.c M src/ec/lenovo/h8/bluetooth.c M src/ec/lenovo/h8/h8.h M src/ec/lenovo/h8/wwan.c 4 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/40706/1
diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c index b904586..c547f17 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(const struct device *dev) +static void r8168_net_fill_ssdt(struct device *dev) { struct drivers_net_config *config = dev->chip_info; const char *path = acpi_device_path(dev->bus->dev); diff --git a/src/ec/lenovo/h8/bluetooth.c b/src/ec/lenovo/h8/bluetooth.c index 0ee0c02..561072f 100644 --- a/src/ec/lenovo/h8/bluetooth.c +++ b/src/ec/lenovo/h8/bluetooth.c @@ -25,7 +25,7 @@ /* * Detect BDC on supported MBs. */ -bool h8_has_bdc(struct device *dev) +bool h8_has_bdc(const struct device *dev) { struct ec_lenovo_h8_config *conf = dev->chip_info;
diff --git a/src/ec/lenovo/h8/h8.h b/src/ec/lenovo/h8/h8.h index ecc9aab..8999cc3 100644 --- a/src/ec/lenovo/h8/h8.h +++ b/src/ec/lenovo/h8/h8.h @@ -29,11 +29,11 @@
void h8_bluetooth_enable(int on); bool h8_bluetooth_nv_enable(void); -bool h8_has_bdc(struct device *dev); +bool h8_has_bdc(const struct device *dev);
void h8_wwan_enable(int on); bool h8_wwan_nv_enable(void); -bool h8_has_wwan(struct device *dev); +bool h8_has_wwan(const struct device *dev);
void h8_ssdt_generator(struct device *dev);
diff --git a/src/ec/lenovo/h8/wwan.c b/src/ec/lenovo/h8/wwan.c index cb60ce8..4a07604 100644 --- a/src/ec/lenovo/h8/wwan.c +++ b/src/ec/lenovo/h8/wwan.c @@ -23,7 +23,7 @@ /* * Detect WWAN on supported MBs. */ -bool h8_has_wwan(struct device *dev) +bool h8_has_wwan(const struct device *dev) { struct ec_lenovo_h8_config *conf = dev->chip_info;
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40706 )
Change subject: ec/lenovo/h8: Constify struct device * parameter to h8_has_* functions ......................................................................
Patch Set 6: Code-Review+2
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40706 )
Change subject: ec/lenovo/h8: Constify struct device * parameter to h8_has_* functions ......................................................................
Patch Set 6: Code-Review+2
Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40706 )
Change subject: ec/lenovo/h8: Constify struct device * parameter to h8_has_* functions ......................................................................
ec/lenovo/h8: Constify struct device * parameter to h8_has_* functions
h8_has_bdc() and h8_has_wwan() do not need to modify the device structure. Hence, this change makes the struct device * parameter to these functions as const.
This is being done in preparation to make struct device * parameter to fill_ssdt as const.
Change-Id: Id3d65d2de7b5161b0e7cff26055c00d5dae967dc Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/40706 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/ec/lenovo/h8/bluetooth.c M src/ec/lenovo/h8/h8.h M src/ec/lenovo/h8/wwan.c 3 files changed, 4 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved HAOUAS Elyes: Looks good to me, approved
diff --git a/src/ec/lenovo/h8/bluetooth.c b/src/ec/lenovo/h8/bluetooth.c index 0ee0c02..561072f 100644 --- a/src/ec/lenovo/h8/bluetooth.c +++ b/src/ec/lenovo/h8/bluetooth.c @@ -25,7 +25,7 @@ /* * Detect BDC on supported MBs. */ -bool h8_has_bdc(struct device *dev) +bool h8_has_bdc(const struct device *dev) { struct ec_lenovo_h8_config *conf = dev->chip_info;
diff --git a/src/ec/lenovo/h8/h8.h b/src/ec/lenovo/h8/h8.h index ecc9aab..8999cc3 100644 --- a/src/ec/lenovo/h8/h8.h +++ b/src/ec/lenovo/h8/h8.h @@ -29,11 +29,11 @@
void h8_bluetooth_enable(int on); bool h8_bluetooth_nv_enable(void); -bool h8_has_bdc(struct device *dev); +bool h8_has_bdc(const struct device *dev);
void h8_wwan_enable(int on); bool h8_wwan_nv_enable(void); -bool h8_has_wwan(struct device *dev); +bool h8_has_wwan(const struct device *dev);
void h8_ssdt_generator(struct device *dev);
diff --git a/src/ec/lenovo/h8/wwan.c b/src/ec/lenovo/h8/wwan.c index cb60ce8..4a07604 100644 --- a/src/ec/lenovo/h8/wwan.c +++ b/src/ec/lenovo/h8/wwan.c @@ -23,7 +23,7 @@ /* * Detect WWAN on supported MBs. */ -bool h8_has_wwan(struct device *dev) +bool h8_has_wwan(const struct device *dev) { struct ec_lenovo_h8_config *conf = dev->chip_info;