linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ACPI / property: fix data node parsing in acpi_get_next_subnode
@ 2016-03-13  0:33 Irina Tirdea
  2016-03-18  0:44 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Irina Tirdea @ 2016-03-13  0:33 UTC (permalink / raw)
  To: linux-acpi, Len Brown, Rafael J. Wysocki
  Cc: Mika Westerberg, Andy Shevchenko, linux-kernel, Octavian Purdila,
	Cristina Ciocan, Irina Tirdea

When an ACPI node has both ACPI device nodes and ACPI data nodes,
acpi_get_next_subnode will return the ACPI data nodes of its last
parsed child.

Make sure that the acpi device that is parsed is the original acpi
node and not any of its children.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
---
 drivers/acpi/property.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 2aee416..f2fd3fe 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -816,6 +816,7 @@ struct fwnode_handle *acpi_get_next_subnode(struct device *dev,
 			next = adev->node.next;
 			if (next == head) {
 				child = NULL;
+				adev = ACPI_COMPANION(dev);
 				goto nondev;
 			}
 			adev = list_entry(next, struct acpi_device, node);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] ACPI / property: fix data node parsing in acpi_get_next_subnode
  2016-03-13  0:33 [PATCH 1/1] ACPI / property: fix data node parsing in acpi_get_next_subnode Irina Tirdea
@ 2016-03-18  0:44 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-03-18  0:44 UTC (permalink / raw)
  To: Irina Tirdea
  Cc: linux-acpi, Len Brown, Mika Westerberg, Andy Shevchenko,
	linux-kernel, Octavian Purdila, Cristina Ciocan

On Sunday, March 13, 2016 02:33:30 AM Irina Tirdea wrote:
> When an ACPI node has both ACPI device nodes and ACPI data nodes,
> acpi_get_next_subnode will return the ACPI data nodes of its last
> parsed child.
> 
> Make sure that the acpi device that is parsed is the original acpi
> node and not any of its children.
> 
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>

Applied (with slightly modified changelog).

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-18  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-13  0:33 [PATCH 1/1] ACPI / property: fix data node parsing in acpi_get_next_subnode Irina Tirdea
2016-03-18  0:44 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).