diff options
author | David Henningsson <david.henningsson@canonical.com> | 2013-11-19 10:55:17 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-11-19 11:28:21 +0100 |
commit | e068fafb31be7bf0da0df6081b3f644e91903f7e (patch) | |
tree | 8055bbc58682efd46625bc7aeb82fefbac13aa17 | |
parent | aa481a7015111e53539680130bf32db7aea473e7 (diff) | |
download | hda-emu-e068fafb31be7bf0da0df6081b3f644e91903f7e.tar.gz |
Add acpi.h header
This is needed for the new acpi functionality in patch_realtek.c.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/acpi/acpi.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h new file mode 100644 index 0000000..d7d6cb9 --- /dev/null +++ b/include/acpi/acpi.h @@ -0,0 +1,36 @@ +#ifndef __ACPI_H__ +#define __ACPI_H__ + +/* Copy-pasted from acpixf.h, acexcep.h and actypes.h. */ + +/* + * Miscellaneous types + */ +typedef u32 acpi_status; /* All ACPI Exceptions */ +typedef u32 acpi_name; /* 4-byte ACPI name */ +typedef char *acpi_string; /* Null terminated ASCII string */ +typedef void *acpi_handle; /* Actually a ptr to a NS Node */ + +typedef +acpi_status(*acpi_walk_callback) (acpi_handle object, + u32 nesting_level, + void *context, void **return_value); + +/* + * Success is always zero, failure is non-zero + */ +#define ACPI_SUCCESS(a) (!(a)) +#define ACPI_FAILURE(a) (a) + +#define ACPI_SKIP(a) (a == AE_CTRL_SKIP) +#define AE_OK (acpi_status) 0x0000 + +static inline acpi_status +acpi_get_devices(const char *HID, + acpi_walk_callback user_function, + void *context, void **return_value) +{ + return user_function(NULL, 0, context, NULL); +} + +#endif /* __ACPI_H__ */ |