diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2017-07-21 07:39:34 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-21 18:04:50 -0400 |
commit | 99a85464693faa9b6829cb753b328c2e4434d94b (patch) | |
tree | 0ad4af4721167fd8fa7505ebb1d8b97c3a02bfdd /include/linux/acpi.h | |
parent | 8b9d6802583a1ef6977e4b059f9fa848e6882253 (diff) |
ACPI: Constify internal fwnode arguments
Constify internal ACPI fwnode arguments in preparation for the same in
fwnode API.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 71b763f0bee9..4d9fb610f114 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -1003,13 +1003,14 @@ struct acpi_reference_args { | |||
1003 | }; | 1003 | }; |
1004 | 1004 | ||
1005 | #ifdef CONFIG_ACPI | 1005 | #ifdef CONFIG_ACPI |
1006 | int acpi_dev_get_property(struct acpi_device *adev, const char *name, | 1006 | int acpi_dev_get_property(const struct acpi_device *adev, const char *name, |
1007 | acpi_object_type type, const union acpi_object **obj); | 1007 | acpi_object_type type, const union acpi_object **obj); |
1008 | int __acpi_node_get_property_reference(struct fwnode_handle *fwnode, | 1008 | int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode, |
1009 | const char *name, size_t index, size_t num_args, | 1009 | const char *name, size_t index, size_t num_args, |
1010 | struct acpi_reference_args *args); | 1010 | struct acpi_reference_args *args); |
1011 | 1011 | ||
1012 | static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, | 1012 | static inline int acpi_node_get_property_reference( |
1013 | const struct fwnode_handle *fwnode, | ||
1013 | const char *name, size_t index, | 1014 | const char *name, size_t index, |
1014 | struct acpi_reference_args *args) | 1015 | struct acpi_reference_args *args) |
1015 | { | 1016 | { |
@@ -1017,13 +1018,15 @@ static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, | |||
1017 | MAX_ACPI_REFERENCE_ARGS, args); | 1018 | MAX_ACPI_REFERENCE_ARGS, args); |
1018 | } | 1019 | } |
1019 | 1020 | ||
1020 | int acpi_node_prop_get(struct fwnode_handle *fwnode, const char *propname, | 1021 | int acpi_node_prop_get(const struct fwnode_handle *fwnode, const char *propname, |
1021 | void **valptr); | 1022 | void **valptr); |
1022 | int acpi_dev_prop_read_single(struct acpi_device *adev, const char *propname, | 1023 | int acpi_dev_prop_read_single(struct acpi_device *adev, |
1023 | enum dev_prop_type proptype, void *val); | 1024 | const char *propname, enum dev_prop_type proptype, |
1024 | int acpi_node_prop_read(struct fwnode_handle *fwnode, const char *propname, | 1025 | void *val); |
1025 | enum dev_prop_type proptype, void *val, size_t nval); | 1026 | int acpi_node_prop_read(const struct fwnode_handle *fwnode, |
1026 | int acpi_dev_prop_read(struct acpi_device *adev, const char *propname, | 1027 | const char *propname, enum dev_prop_type proptype, |
1028 | void *val, size_t nval); | ||
1029 | int acpi_dev_prop_read(const struct acpi_device *adev, const char *propname, | ||
1027 | enum dev_prop_type proptype, void *val, size_t nval); | 1030 | enum dev_prop_type proptype, void *val, size_t nval); |
1028 | 1031 | ||
1029 | struct fwnode_handle *acpi_get_next_subnode(struct fwnode_handle *fwnode, | 1032 | struct fwnode_handle *acpi_get_next_subnode(struct fwnode_handle *fwnode, |
@@ -1100,35 +1103,36 @@ static inline int acpi_dev_get_property(struct acpi_device *adev, | |||
1100 | } | 1103 | } |
1101 | 1104 | ||
1102 | static inline int | 1105 | static inline int |
1103 | __acpi_node_get_property_reference(struct fwnode_handle *fwnode, | 1106 | __acpi_node_get_property_reference(const struct fwnode_handle *fwnode, |
1104 | const char *name, size_t index, size_t num_args, | 1107 | const char *name, size_t index, size_t num_args, |
1105 | struct acpi_reference_args *args) | 1108 | struct acpi_reference_args *args) |
1106 | { | 1109 | { |
1107 | return -ENXIO; | 1110 | return -ENXIO; |
1108 | } | 1111 | } |
1109 | 1112 | ||
1110 | static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, | 1113 | static inline int |
1111 | const char *name, size_t index, | 1114 | acpi_node_get_property_reference(const struct fwnode_handle *fwnode, |
1112 | struct acpi_reference_args *args) | 1115 | const char *name, size_t index, |
1116 | struct acpi_reference_args *args) | ||
1113 | { | 1117 | { |
1114 | return -ENXIO; | 1118 | return -ENXIO; |
1115 | } | 1119 | } |
1116 | 1120 | ||
1117 | static inline int acpi_node_prop_get(struct fwnode_handle *fwnode, | 1121 | static inline int acpi_node_prop_get(const struct fwnode_handle *fwnode, |
1118 | const char *propname, | 1122 | const char *propname, |
1119 | void **valptr) | 1123 | void **valptr) |
1120 | { | 1124 | { |
1121 | return -ENXIO; | 1125 | return -ENXIO; |
1122 | } | 1126 | } |
1123 | 1127 | ||
1124 | static inline int acpi_dev_prop_get(struct acpi_device *adev, | 1128 | static inline int acpi_dev_prop_get(const struct acpi_device *adev, |
1125 | const char *propname, | 1129 | const char *propname, |
1126 | void **valptr) | 1130 | void **valptr) |
1127 | { | 1131 | { |
1128 | return -ENXIO; | 1132 | return -ENXIO; |
1129 | } | 1133 | } |
1130 | 1134 | ||
1131 | static inline int acpi_dev_prop_read_single(struct acpi_device *adev, | 1135 | static inline int acpi_dev_prop_read_single(const struct acpi_device *adev, |
1132 | const char *propname, | 1136 | const char *propname, |
1133 | enum dev_prop_type proptype, | 1137 | enum dev_prop_type proptype, |
1134 | void *val) | 1138 | void *val) |
@@ -1136,7 +1140,7 @@ static inline int acpi_dev_prop_read_single(struct acpi_device *adev, | |||
1136 | return -ENXIO; | 1140 | return -ENXIO; |
1137 | } | 1141 | } |
1138 | 1142 | ||
1139 | static inline int acpi_node_prop_read(struct fwnode_handle *fwnode, | 1143 | static inline int acpi_node_prop_read(const struct fwnode_handle *fwnode, |
1140 | const char *propname, | 1144 | const char *propname, |
1141 | enum dev_prop_type proptype, | 1145 | enum dev_prop_type proptype, |
1142 | void *val, size_t nval) | 1146 | void *val, size_t nval) |
@@ -1144,7 +1148,7 @@ static inline int acpi_node_prop_read(struct fwnode_handle *fwnode, | |||
1144 | return -ENXIO; | 1148 | return -ENXIO; |
1145 | } | 1149 | } |
1146 | 1150 | ||
1147 | static inline int acpi_dev_prop_read(struct acpi_device *adev, | 1151 | static inline int acpi_dev_prop_read(const struct acpi_device *adev, |
1148 | const char *propname, | 1152 | const char *propname, |
1149 | enum dev_prop_type proptype, | 1153 | enum dev_prop_type proptype, |
1150 | void *val, size_t nval) | 1154 | void *val, size_t nval) |