summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-12 01:07:46 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-12 01:07:46 +0100
commit989652871b06f1fb173bc5e8e2ea03bec8f8eeeb (patch)
tree1a9331bbbf04b5e04148e68214e52551b2f1317f /drivers/acpi
parentafd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc (diff)
parentf6740c1899d2ee2c4c9ec5301d4b712d4e706a79 (diff)
Merge branch 'device-properties'
* device-properties: device property: avoid allocations of 0 length device property: the secondary fwnode needs to depend on the primary device property: add spaces to PROPERTY_ENTRY_STRING macro include/linux/property.h: fix build issues with gcc-4.4.4 i2c: designware: Convert to use unified device property API mfd: intel-lpss: Pass HSUART configuration via properties mfd: intel-lpss: Pass SDA hold time to I2C host controller driver mfd: intel-lpss: Add support for passing device properties mfd: core: propagate device properties to sub devices drivers driver core: Do not overwrite secondary fwnode with NULL if it is set driver core: platform: Add support for built-in device properties device property: Take a copy of the property set device property: Fallback to secondary fwnode if primary misses the property device property: return -EINVAL when property isn't found in ACPI device property: improve readability of macros device property: helper macros for property entry creation device property: keep single value inplace device property: refactor built-in properties support device property: rename helper functions device property: always check for fwnode type
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/property.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 88f4306744c0..2aee41655ce9 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -346,7 +346,7 @@ void acpi_free_properties(struct acpi_device *adev)
*
* Return: %0 if property with @name has been found (success),
* %-EINVAL if the arguments are invalid,
- * %-ENODATA if the property doesn't exist,
+ * %-EINVAL if the property doesn't exist,
* %-EPROTO if the property value type doesn't match @type.
*/
static int acpi_data_get_property(struct acpi_device_data *data,
@@ -360,7 +360,7 @@ static int acpi_data_get_property(struct acpi_device_data *data,
return -EINVAL;
if (!data->pointer || !data->properties)
- return -ENODATA;
+ return -EINVAL;
properties = data->properties;
for (i = 0; i < properties->package.count; i++) {
@@ -375,13 +375,13 @@ static int acpi_data_get_property(struct acpi_device_data *data,
if (!strcmp(name, propname->string.pointer)) {
if (type != ACPI_TYPE_ANY && propvalue->type != type)
return -EPROTO;
- else if (obj)
+ if (obj)
*obj = propvalue;
return 0;
}
}
- return -ENODATA;
+ return -EINVAL;
}
/**
@@ -439,7 +439,7 @@ int acpi_node_prop_get(struct fwnode_handle *fwnode, const char *propname,
*
* Return: %0 if array property (package) with @name has been found (success),
* %-EINVAL if the arguments are invalid,
- * %-ENODATA if the property doesn't exist,
+ * %-EINVAL if the property doesn't exist,
* %-EPROTO if the property is not a package or the type of its elements
* doesn't match @type.
*/