From 977d5ad39f3ea12ac0bd51d75020cea5ecdca235 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Tue, 17 Jul 2018 17:19:11 +0300 Subject: ACPI: Convert ACPI reference args to generic fwnode reference args Convert all users of struct acpi_reference_args to more generic fwnode_reference_args. This will 1) avoid an ACPI specific references to device nodes with integer arguments as well as 2) allow making references to nodes other than device nodes in ACPI. As a by-product, convert the fwnode interger arguments to u64. The arguments were 64-bit integers on ACPI but the fwnode arguments were just 32-bit. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki --- include/linux/acpi.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'include/linux/acpi.h') diff --git a/include/linux/acpi.h b/include/linux/acpi.h index e54f40974eb0..11cf39719fd8 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1058,27 +1058,20 @@ static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index) /* Device properties */ -#define MAX_ACPI_REFERENCE_ARGS 8 -struct acpi_reference_args { - struct acpi_device *adev; - size_t nargs; - u64 args[MAX_ACPI_REFERENCE_ARGS]; -}; - #ifdef CONFIG_ACPI int acpi_dev_get_property(const struct acpi_device *adev, const char *name, acpi_object_type type, const union acpi_object **obj); int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode, const char *name, size_t index, size_t num_args, - struct acpi_reference_args *args); + struct fwnode_reference_args *args); static inline int acpi_node_get_property_reference( const struct fwnode_handle *fwnode, const char *name, size_t index, - struct acpi_reference_args *args) + struct fwnode_reference_args *args) { return __acpi_node_get_property_reference(fwnode, name, index, - MAX_ACPI_REFERENCE_ARGS, args); + NR_FWNODE_REFERENCE_ARGS, args); } int acpi_node_prop_get(const struct fwnode_handle *fwnode, const char *propname, @@ -1169,7 +1162,7 @@ static inline int acpi_dev_get_property(struct acpi_device *adev, static inline int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode, const char *name, size_t index, size_t num_args, - struct acpi_reference_args *args) + struct fwnode_reference_args *args) { return -ENXIO; } @@ -1177,7 +1170,7 @@ __acpi_node_get_property_reference(const struct fwnode_handle *fwnode, static inline int acpi_node_get_property_reference(const struct fwnode_handle *fwnode, const char *name, size_t index, - struct acpi_reference_args *args) + struct fwnode_reference_args *args) { return -ENXIO; } -- cgit v1.2.1