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 @@ | |||
42 | #include <acpi/acpi_bus.h> | 42 | #include <acpi/acpi_bus.h> |
43 | #include <acpi/acpi_drivers.h> | 43 | #include <acpi/acpi_drivers.h> |
44 | #include <acpi/acpi_numa.h> | 44 | #include <acpi/acpi_numa.h> |
45 | #include <acpi/acpi_io.h> | ||
45 | #include <asm/acpi.h> | 46 | #include <asm/acpi.h> |
46 | 47 | ||
47 | static inline acpi_handle acpi_device_handle(struct acpi_device *adev) | 48 | 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) | |||
53 | #define ACPI_COMPANION_SET(dev, adev) ACPI_COMPANION(dev) = (adev) | 54 | #define ACPI_COMPANION_SET(dev, adev) ACPI_COMPANION(dev) = (adev) |
54 | #define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev)) | 55 | #define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev)) |
55 | 56 | ||
57 | static inline void acpi_preset_companion(struct device *dev, | ||
58 | struct acpi_device *parent, u64 addr) | ||
59 | { | ||
60 | ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL)); | ||
61 | } | ||
62 | |||
56 | static inline const char *acpi_dev_name(struct acpi_device *adev) | 63 | static inline const char *acpi_dev_name(struct acpi_device *adev) |
57 | { | 64 | { |
58 | return dev_name(&adev->dev); | 65 | return dev_name(&adev->dev); |
@@ -409,6 +416,9 @@ static inline bool acpi_driver_match_device(struct device *dev, | |||
409 | return !!acpi_match_device(drv->acpi_match_table, dev); | 416 | return !!acpi_match_device(drv->acpi_match_table, dev); |
410 | } | 417 | } |
411 | 418 | ||
419 | int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); | ||
420 | int acpi_device_modalias(struct device *, char *, int); | ||
421 | |||
412 | #define ACPI_PTR(_ptr) (_ptr) | 422 | #define ACPI_PTR(_ptr) (_ptr) |
413 | 423 | ||
414 | #else /* !CONFIG_ACPI */ | 424 | #else /* !CONFIG_ACPI */ |
@@ -460,7 +470,7 @@ struct acpi_table_header; | |||
460 | static inline int acpi_table_parse(char *id, | 470 | static inline int acpi_table_parse(char *id, |
461 | int (*handler)(struct acpi_table_header *)) | 471 | int (*handler)(struct acpi_table_header *)) |
462 | { | 472 | { |
463 | return -1; | 473 | return -ENODEV; |
464 | } | 474 | } |
465 | 475 | ||
466 | static inline int acpi_nvs_register(__u64 start, __u64 size) | 476 | static inline int acpi_nvs_register(__u64 start, __u64 size) |
@@ -488,6 +498,18 @@ static inline bool acpi_driver_match_device(struct device *dev, | |||
488 | return false; | 498 | return false; |
489 | } | 499 | } |
490 | 500 | ||
501 | static inline int acpi_device_uevent_modalias(struct device *dev, | ||
502 | struct kobj_uevent_env *env) | ||
503 | { | ||
504 | return -ENODEV; | ||
505 | } | ||
506 | |||
507 | static inline int acpi_device_modalias(struct device *dev, | ||
508 | char *buf, int size) | ||
509 | { | ||
510 | return -ENODEV; | ||
511 | } | ||
512 | |||
491 | #define ACPI_PTR(_ptr) (NULL) | 513 | #define ACPI_PTR(_ptr) (NULL) |
492 | 514 | ||
493 | #endif /* !CONFIG_ACPI */ | 515 | #endif /* !CONFIG_ACPI */ |