ACPI: Provide !ACPI stub for acpi_device_uid()
Subsystems (2)
PATCH v2 1/1 ACPI: Provide !ACPI stub for acpi_device_uid()
While the likes of acpi_dev_uid_to_integer() and acpi_dev_uid_match() already have stubs for !ACPI, the basic acpi_device_uid() getter does not. Although calls in portable drivers should already be conditional on a valid acpi_device in a manner which would usually lead to compile- time elimination anyway, add a stub for the sake of completeness.
---
v2: Distinct non-const definition to avoid further theoretical issues
--- include/acpi/acpi_bus.h | 5 +++++ 1 file changed, 5 insertions(+)
include/acpi/acpi_bus.h +5 -0
@@ -964,6 +964,11 @@ static inline const char *acpi_device_hid(struct acpi_device *device)return "" ; } +static inline char *acpi_device_uid (struct acpi_device *device) +{ +return NULL ; +} +static inline bool acpi_get_physical_device_location (acpi_handle handle,struct acpi_pld_info **pld) {
Signature · 1 line
2.54.0.dirty
Quoted 22 lines · Robin Murphy
While the likes of
acpi_dev_uid_to_integer()andacpi_dev_uid_match()already have stubs for !ACPI, the basicacpi_device_uid()getter does not. Although calls in portable drivers should already be conditional on a validacpi_devicein a manner which would usually lead to compile- time elimination anyway, add a stub for the sake of completeness.Signed-off-by Robin Murphy <[email protected]>---
v2: Distinct non-const definition to avoid further theoretical issues--- include/acpi/acpi_bus.h | 5 +++++ 1 file changed, 5 insertions(+)include/acpi/acpi_bus.h +0
-0@@ -964,6 +964,11 @@ static inline const char *acpi_device_hid(struct acpi_device *device)return "" ; }
include/acpi/acpi_bus.h static inline const char *acpi_device_hid(struct acpi_device *device)
Quoted 10 lines
include/acpi/acpi_bus.h +5
-1+static inline char *acpi_device_uid (struct acpi_device *device) +{ +return NULL ; +} +static inline bool acpi_get_physical_device_location (acpi_handle handle,struct acpi_pld_info **pld) { --
Applied as 7.4 material, thanks!