From e825d3f4d69c1e3700ac3ce2896168fd9f092f19 Mon Sep 17 00:00:00 2001 From: Aamir Bohra Date: Tue, 30 Jul 2019 10:11:41 +0530 Subject: src/arch/x86/acpi: Constify struct device instances Constify the struct device arguments in below APIs: > acpi_device_name > acpi_device_path_fill > acpi_device_path > acpi_write_dbg2_pci_uart > acpi_device_scope > acpi_device_path_join The APIs do not seem to modify the argument and are using device argument as reference to device only. Change-Id: Ic2ce045f17efa288eb41503795723d0ad5ec78bd Signed-off-by: Aamir Bohra Reviewed-on: https://review.coreboot.org/c/coreboot/+/34625 Reviewed-by: Subrata Banik Reviewed-by: Patrick Rudolph Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/arch/x86/include/arch/acpi.h | 2 +- src/arch/x86/include/arch/acpi_device.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index 6251b98142..259efcd2d5 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -901,7 +901,7 @@ void acpi_create_dbg2(acpi_dbg2_header_t *dbg2_header, const char *device_path); unsigned long acpi_write_dbg2_pci_uart(acpi_rsdp_t *rsdp, unsigned long current, - struct device *dev, uint8_t access_size); + const struct device *dev, uint8_t access_size); void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags, unsigned long (*acpi_fill_dmar)(unsigned long)); unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags, diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index 35695467cb..d74af9da74 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -62,10 +62,10 @@ struct acpi_dp { #define ACPI_DT_NAMESPACE_HID "PRP0001" struct device; -const char *acpi_device_name(struct device *dev); -const char *acpi_device_path(struct device *dev); -const char *acpi_device_scope(struct device *dev); -const char *acpi_device_path_join(struct device *dev, const char *name); +const char *acpi_device_name(const struct device *dev); +const char *acpi_device_path(const struct device *dev); +const char *acpi_device_scope(const struct device *dev); +const char *acpi_device_path_join(const struct device *dev, const char *name); int acpi_device_status(const struct device *dev); /* -- cgit v1.2.3