* linux-next: manual merge of the mfd tree with the pm tree
@ 2015-07-29 2:27 Stephen Rothwell
2015-07-29 7:44 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2015-07-29 2:27 UTC (permalink / raw)
To: Lee Jones, Rafael J. Wysocki
Cc: linux-next, linux-kernel, Mika Westerberg, Andy Shevchenko
Hi Lee,
Today's linux-next merge of the mfd tree got a conflict in:
drivers/acpi/scan.c
between commit:
68c6b148daa6 ("ACPI / scan: Move device matching code to bus.c")
from the pm tree and commit:
712e960f0ee9 ("ACPI / PM: Attach ACPI power domain only once")
from the mfd tree.
I fixed it up by adding the following merge fix patch and can carry the
fix as necessary.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 29 Jul 2015 12:07:20 +1000
Subject: [PATCH] ACPI / PM: merge fix for code movement
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/acpi/bus.c | 46 ++++++++++++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 54a2e66ce236..afc15bf929d8 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -482,6 +482,35 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device)
Device Matching
-------------------------------------------------------------------------- */
+/**
+ * acpi_device_is_first_physical_node - Is given dev first physical node
+ * @adev: ACPI companion device
+ * @dev: Physical device to check
+ *
+ * Function checks if given @dev is the first physical devices attached to
+ * the ACPI companion device. This distinction is needed in some cases
+ * where the same companion device is shared between many physical devices.
+ *
+ * Note that the caller have to provide valid @adev pointer.
+ */
+bool acpi_device_is_first_physical_node(struct acpi_device *adev,
+ const struct device *dev)
+{
+ bool ret = false;
+
+ mutex_lock(&adev->physical_node_lock);
+ if (!list_empty(&adev->physical_node_list)) {
+ const struct acpi_device_physical_node *node;
+
+ node = list_first_entry(&adev->physical_node_list,
+ struct acpi_device_physical_node, node);
+ ret = node->dev == dev;
+ }
+ mutex_unlock(&adev->physical_node_lock);
+
+ return ret;
+}
+
/*
* acpi_companion_match() - Can we match via ACPI companion device
* @dev: Device in question
@@ -506,7 +535,6 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device)
struct acpi_device *acpi_companion_match(const struct device *dev)
{
struct acpi_device *adev;
- struct mutex *physical_node_lock;
adev = ACPI_COMPANION(dev);
if (!adev)
@@ -515,21 +543,7 @@ struct acpi_device *acpi_companion_match(const struct device *dev)
if (list_empty(&adev->pnp.ids))
return NULL;
- physical_node_lock = &adev->physical_node_lock;
- mutex_lock(physical_node_lock);
- if (list_empty(&adev->physical_node_list)) {
- adev = NULL;
- } else {
- const struct acpi_device_physical_node *node;
-
- node = list_first_entry(&adev->physical_node_list,
- struct acpi_device_physical_node, node);
- if (node->dev != dev)
- adev = NULL;
- }
- mutex_unlock(physical_node_lock);
-
- return adev;
+ return acpi_device_is_first_physical_node(adev, dev) ? adev : NULL;
}
/**
--
2.4.6
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: linux-next: manual merge of the mfd tree with the pm tree
2015-07-29 2:27 linux-next: manual merge of the mfd tree with the pm tree Stephen Rothwell
@ 2015-07-29 7:44 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2015-07-29 7:44 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Rafael J. Wysocki, linux-next, linux-kernel, Mika Westerberg,
Andy Shevchenko
> Hi Lee,
Morning Stephen.
> Today's linux-next merge of the mfd tree got a conflict in:
>
> drivers/acpi/scan.c
>
> between commit:
>
> 68c6b148daa6 ("ACPI / scan: Move device matching code to bus.c")
>
> from the pm tree and commit:
>
> 712e960f0ee9 ("ACPI / PM: Attach ACPI power domain only once")
>
> from the mfd tree.
I believe this will go away when Rafael pulls [0]
[0] http://www.kernelhub.org/?msg=803290&p=2
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-29 7:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 2:27 linux-next: manual merge of the mfd tree with the pm tree Stephen Rothwell
2015-07-29 7:44 ` Lee Jones
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).