summaryrefslogtreecommitdiff
path: root/drivers/acpi/proc.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-09-05 06:43:30 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-09-05 06:43:30 (GMT)
commit91c2beb56b3ab5cf91fe04ddaeb69b90a22b5d36 (patch)
tree86dbad225295d8a63048da48728381614c10e1a2 /drivers/acpi/proc.c
parent83c93e2bdfe33694032cc6d74e956755dd62e551 (diff)
parentf2110cb961200e5c382e9d0878ded015109b5dd6 (diff)
downloadlinux-91c2beb56b3ab5cf91fe04ddaeb69b90a22b5d36.tar.xz
Merge remote-tracking branch 'agust/next' into next
From Anatolij: << There are cleanups for some mpc5121 specific drivers and DTS files in preparation to switch mpc5121 clock support to a clock driver based on common clock framework. Additionally Sebastian fixed the mpc52xx PIC driver so that it builds when using older gcc versions. >>
Diffstat (limited to 'drivers/acpi/proc.c')
-rw-r--r--drivers/acpi/proc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index aa1227a..04a1378 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -311,6 +311,8 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
dev->pnp.bus_id,
(u32) dev->wakeup.sleep_state);
+ mutex_lock(&dev->physical_node_lock);
+
if (!dev->physical_node_count) {
seq_printf(seq, "%c%-8s\n",
dev->wakeup.flags.run_wake ? '*' : ' ',
@@ -338,6 +340,8 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
put_device(ldev);
}
}
+
+ mutex_unlock(&dev->physical_node_lock);
}
mutex_unlock(&acpi_device_lock);
return 0;
@@ -347,12 +351,16 @@ static void physical_device_enable_wakeup(struct acpi_device *adev)
{
struct acpi_device_physical_node *entry;
+ mutex_lock(&adev->physical_node_lock);
+
list_for_each_entry(entry,
&adev->physical_node_list, node)
if (entry->dev && device_can_wakeup(entry->dev)) {
bool enable = !device_may_wakeup(entry->dev);
device_set_wakeup_enable(entry->dev, enable);
}
+
+ mutex_unlock(&adev->physical_node_lock);
}
static ssize_t