mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ACPI: bus: Use acpi/acpi_bus.h without CONFIG_ACPI
Corrently acpi/acpi_bus.h is included in linux/acpi.h only if CONFIG_ACPI is set, but it contains declarations that are useful otherwise too. For consistency, modify linux/acpi.h to always include acpi/acpi_bus.h and update the latter to avoid exposing too much when CONFIG_ACPI is not set. Since acpi_has_method() is called from some code build when CONFIG_ACPI is unset, add a stub for it to the !CONFIG_ACPI block in acpi/acpi_bus.h. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org> Link: https://patch.msgid.link/3717753.iIbC2pHGDl@rafael.j.wysocki
This commit is contained in:
parent
93f51579e7
commit
e7280ab196
|
|
@ -9,6 +9,8 @@
|
|||
#ifndef __ACPI_BUS_H__
|
||||
#define __ACPI_BUS_H__
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
#include <linux/completion.h>
|
||||
#include <linux/container_of.h>
|
||||
#include <linux/device.h>
|
||||
|
|
@ -58,7 +60,6 @@ bool acpi_dock_match(acpi_handle handle);
|
|||
bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
|
||||
union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
|
||||
u64 rev, u64 func, union acpi_object *argv4);
|
||||
#ifdef CONFIG_ACPI
|
||||
bool
|
||||
acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld);
|
||||
|
||||
|
|
@ -77,7 +78,6 @@ acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
|
|||
|
||||
return obj;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define ACPI_INIT_DSM_ARGV4(cnt, eles) \
|
||||
{ \
|
||||
|
|
@ -90,8 +90,6 @@ bool acpi_dev_found(const char *hid);
|
|||
bool acpi_dev_present(const char *hid, const char *uid, s64 hrv);
|
||||
bool acpi_reduced_hardware(void);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
struct proc_dir_entry;
|
||||
|
||||
#define ACPI_BUS_FILE_ROOT "acpi"
|
||||
|
|
@ -942,8 +940,14 @@ int acpi_wait_for_acpi_ipmi(void);
|
|||
|
||||
int acpi_scan_add_dep(acpi_handle handle, struct acpi_handle_list *dep_devices);
|
||||
u32 arch_acpi_add_auto_dep(acpi_handle handle);
|
||||
|
||||
#else /* CONFIG_ACPI */
|
||||
|
||||
static inline bool acpi_has_method(acpi_handle handle, char *name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline struct device *acpi_bus_get_primary_device(struct acpi_device *adev)
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ struct irq_domain_ops;
|
|||
#define _LINUX
|
||||
#endif
|
||||
#include <acpi/acpi.h>
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include <acpi/acpi_numa.h>
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
|
@ -35,7 +36,6 @@ struct irq_domain_ops;
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/fw_table.h>
|
||||
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include <acpi/acpi_drivers.h>
|
||||
#include <acpi/acpi_io.h>
|
||||
#include <asm/acpi.h>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user