diff options
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d9099b15b472..1151a1dcfe41 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -42,6 +42,7 @@ #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> #include <acpi/acpi_numa.h> +#include <acpi/acpi_io.h> #include <asm/acpi.h> static inline acpi_handle acpi_device_handle(struct acpi_device *adev) @@ -53,6 +54,12 @@ static inline acpi_handle acpi_device_handle(struct acpi_device *adev) #define ACPI_COMPANION_SET(dev, adev) ACPI_COMPANION(dev) = (adev) #define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev)) +static inline void acpi_preset_companion(struct device *dev, + struct acpi_device *parent, u64 addr) +{ + ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL)); +} + static inline const char *acpi_dev_name(struct acpi_device *adev) { return dev_name(&adev->dev); @@ -409,6 +416,9 @@ static inline bool acpi_driver_match_device(struct device *dev, return !!acpi_match_device(drv->acpi_match_table, dev); } +int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); +int acpi_device_modalias(struct device *, char *, int); + #define ACPI_PTR(_ptr) (_ptr) #else /* !CONFIG_ACPI */ @@ -460,7 +470,7 @@ struct acpi_table_header; static inline int acpi_table_parse(char *id, int (*handler)(struct acpi_table_header *)) { - return -1; + return -ENODEV; } static inline int acpi_nvs_register(__u64 start, __u64 size) @@ -488,6 +498,18 @@ static inline bool acpi_driver_match_device(struct device *dev, return false; } +static inline int acpi_device_uevent_modalias(struct device *dev, + struct kobj_uevent_env *env) +{ + return -ENODEV; +} + +static inline int acpi_device_modalias(struct device *dev, + char *buf, int size) +{ + return -ENODEV; +} + #define ACPI_PTR(_ptr) (NULL) #endif /* !CONFIG_ACPI */ |