]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ACPI: property: Allow direct graph endpoint references
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 17 Jul 2018 14:19:15 +0000 (17:19 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Jul 2018 10:44:52 +0000 (12:44 +0200)
By using device and further data node references, allow direct references
to endpoints. These are of form

Package() { \DEV, "portX", "endpointY" }

where X is the number of the port and Y is the number of the endpoint.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/property.c

index 19bdada644351e0b3c55ece144d62576c2948453..10af340eedd230d6b3aeb6367d3d0432117c9bb3 100644 (file)
@@ -1122,9 +1122,9 @@ acpi_graph_get_remote_endpoint(const struct fwnode_handle *__fwnode)
        if (ret)
                return NULL;
 
-       /* Ensure this is a device node. */
+       /* Direct endpoint reference? */
        if (!is_acpi_device_node(args.fwnode))
-               return NULL;
+               return args.nargs ? NULL : args.fwnode;
 
        /*
         * Always require two arguments with the reference: port and