projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
212967c
)
ACPI / PM: Do not refcount power resources that can't be turned on
author
Rafael J. Wysocki
<rjw@sisk.pl>
Wed, 24 Nov 2010 23:03:32 +0000
(
00:03
+0100)
committer
Len Brown
<len.brown@intel.com>
Wed, 1 Dec 2010 21:53:39 +0000
(16:53 -0500)
If turning on a power resource fails, do not reference count it,
since it cannot be in use in that case.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/power.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/acpi/power.c
b/drivers/acpi/power.c
index 792a8309d074a178303eb4c3d467c68a382c760b..4c9c2fb5d98f9a14a67e8618b44dc6f2c642887b 100644
(file)
--- a/
drivers/acpi/power.c
+++ b/
drivers/acpi/power.c
@@
-213,11
+213,13
@@
static int acpi_power_on(acpi_handle handle)
resource->name));
} else {
result = __acpi_power_on(resource);
+ if (result)
+ resource->ref_count--;
}
mutex_unlock(&resource->resource_lock);
- return
0
;
+ return
result
;
}
static int acpi_power_off_device(acpi_handle handle)