arch/x86/acpi_device: Constify struct device * parameter to UID functions
acpi_device_uid() and acpi_device_write_uid() do not need to make changes to the device structure. Thus, this change marks struct device * parameter to these functions as const. Change-Id: I3755223766c78f93c57ac80caf392985cfd5c5e5 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40702 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
0f007d8ceb
commit
d14d03a6a8
|
@ -95,7 +95,7 @@ const char *acpi_device_hid(const struct device *dev)
|
|||
* Generate unique ID based on the ACPI path.
|
||||
* Collisions on the same _HID are possible but very unlikely.
|
||||
*/
|
||||
uint32_t acpi_device_uid(struct device *dev)
|
||||
uint32_t acpi_device_uid(const struct device *dev)
|
||||
{
|
||||
const char *path = acpi_device_path(dev);
|
||||
if (!path)
|
||||
|
@ -200,7 +200,7 @@ int acpi_device_status(const struct device *dev)
|
|||
|
||||
|
||||
/* Write the unique _UID based on ACPI device path. */
|
||||
void acpi_device_write_uid(struct device *dev)
|
||||
void acpi_device_write_uid(const struct device *dev)
|
||||
{
|
||||
acpigen_write_name_integer("_UID", acpi_device_uid(dev));
|
||||
}
|
||||
|
|
|
@ -52,12 +52,12 @@ struct acpi_dp {
|
|||
struct device;
|
||||
const char *acpi_device_name(const struct device *dev);
|
||||
const char *acpi_device_hid(const struct device *dev);
|
||||
uint32_t acpi_device_uid(struct device *dev);
|
||||
uint32_t acpi_device_uid(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);
|
||||
void acpi_device_write_uid(struct device *dev);
|
||||
void acpi_device_write_uid(const struct device *dev);
|
||||
|
||||
/*
|
||||
* ACPI Descriptor for extended Interrupt()
|
||||
|
|
Loading…
Reference in New Issue