summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-08-27 04:40:05 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-15 01:47:34 +0200
commit3a7a2ab839ad18c2d542b40f4a647c98d068e55a (patch)
treefca2c5a901c97d41b2aa3ad44d72299b32226183 /drivers/gpio
parent263b4c1a64bc12470684aeaf7c44f03d31716819 (diff)
downloadop-kernel-dev-3a7a2ab839ad18c2d542b40f4a647c98d068e55a.zip
op-kernel-dev-3a7a2ab839ad18c2d542b40f4a647c98d068e55a.tar.gz
ACPI / property: Extend fwnode_property_* to data-only subnodes
Modify is_acpi_node() to return "true" for ACPI data-only subnodes as well as for ACPI device objects and change the name of to_acpi_node() to to_acpi_device_node() so it is clear that it covers ACPI device objects only. Accordingly, introduce to_acpi_data_node() to cover data-only subnodes in an analogous way. With that, make the fwnode_property_* family of functions work with ACPI data-only subnodes introduced previously. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 980c1f8..f43e808 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2083,11 +2083,11 @@ struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode,
&flags);
if (!IS_ERR(desc))
active_low = flags & OF_GPIO_ACTIVE_LOW;
- } else if (is_acpi_node(fwnode)) {
+ } else if (is_acpi_device_node(fwnode)) {
struct acpi_gpio_info info;
- desc = acpi_get_gpiod_by_index(to_acpi_node(fwnode), propname, 0,
- &info);
+ desc = acpi_get_gpiod_by_index(to_acpi_device_node(fwnode),
+ propname, 0, &info);
if (!IS_ERR(desc))
active_low = info.active_low;
}
OpenPOWER on IntegriCloud