diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-05 00:29:07 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-05 20:48:06 +0100 |
commit | 60ba032ed76e851d30d4fa514847285252147d07 (patch) | |
tree | da8a119a5976eaf4241585256df9168d624eb092 /drivers/gpio | |
parent | c673a2b4008103525a3cf21bedf15ffac37bfef0 (diff) | |
download | op-kernel-dev-60ba032ed76e851d30d4fa514847285252147d07.zip op-kernel-dev-60ba032ed76e851d30d4fa514847285252147d07.tar.gz |
ACPI / property: Drop size_prop from acpi_dev_get_property_reference()
The size_prop argument of the recently added function
acpi_dev_get_property_reference() is not used by the only current
caller of that function and is very unlikely to be used at any time
going forward.
Namely, for a property whose value is a list of items each containing
a references to a device object possibly accompanied by some integers,
the number of items in the list can always be computed as the number
of elements of type ACPI_TYPE_LOCAL_REFERENCE in the property package.
Thus it should never be necessary to provide an additional "cells"
property with a value equal to the number of items in that list. It
also should never be necessary to provide a "cells" property specifying
how many integers are supposed to be following each reference.
For this reason, drop the size_prop argument from
acpi_dev_get_property_reference() and update its caller accordingly.
Link: http://marc.info/?l=linux-kernel&m=141511255610556&w=2
Suggested-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 5a4d061..ba98bb5 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -405,7 +405,7 @@ struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev, dev_dbg(&adev->dev, "GPIO: looking up %s\n", propname); memset(&args, 0, sizeof(args)); - ret = acpi_dev_get_property_reference(adev, propname, NULL, + ret = acpi_dev_get_property_reference(adev, propname, index, &args); if (ret) { bool found = acpi_get_driver_gpio_data(adev, propname, |