diff mbox series

[v2,2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI

Message ID 20190924193739.86133-3-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series ACPI / utils: add new helper for HID/UID match | expand

Commit Message

Andy Shevchenko Sept. 24, 2019, 7:37 p.m. UTC
We have a stub defined for the acpi_dev_get_first_match_dev() in acpi.h
for the case when CONFIG_ACPI=n.

Moreover, acpi_dev_put(), counterpart function, is already placed under
CONFIG_ACPI.

Thus, move acpi_dev_get_first_match_dev() under CONFIG_ACPI as well.

Fixes: 817b4d64da03 ("Introduce acpi_dev_get_first_match_dev() helper")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/acpi/acpi_bus.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Mika Westerberg Oct. 1, 2019, 9:32 a.m. UTC | #1
On Tue, Sep 24, 2019 at 10:37:35PM +0300, Andy Shevchenko wrote:
> We have a stub defined for the acpi_dev_get_first_match_dev() in acpi.h
> for the case when CONFIG_ACPI=n.
> 
> Moreover, acpi_dev_put(), counterpart function, is already placed under
> CONFIG_ACPI.
> 
> Thus, move acpi_dev_get_first_match_dev() under CONFIG_ACPI as well.
> 
> Fixes: 817b4d64da03 ("Introduce acpi_dev_get_first_match_dev() helper")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
diff mbox series

Patch

diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 175f7b40c585..3f6fddeb7519 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -78,9 +78,6 @@  acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
 bool acpi_dev_found(const char *hid);
 bool acpi_dev_present(const char *hid, const char *uid, s64 hrv);
 
-struct acpi_device *
-acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv);
-
 #ifdef CONFIG_ACPI
 
 #include <linux/proc_fs.h>
@@ -683,6 +680,9 @@  static inline bool acpi_device_can_poweroff(struct acpi_device *adev)
 		adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set);
 }
 
+struct acpi_device *
+acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv);
+
 static inline void acpi_dev_put(struct acpi_device *adev)
 {
 	put_device(&adev->dev);