msm: pil: Allow pil_put() to shutdown peripherals
Remove the temporary hack to prevent peripherals from shutting down
when pil_put() is called and the reference count goes to 0.
Change-Id: Ia9b9699319416a70e15673188b6f6de1cf8ab18c
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/peripheral-loader.c b/arch/arm/mach-msm/peripheral-loader.c
index 0886975..1004e01 100644
--- a/arch/arm/mach-msm/peripheral-loader.c
+++ b/arch/arm/mach-msm/peripheral-loader.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -288,14 +288,10 @@
mutex_lock(&pil->lock);
WARN(!pil->count, "%s: Reference count mismatch\n", __func__);
- /* TODO: Peripheral shutdown support */
- if (pil->count == 1)
- goto unlock;
if (pil->count)
pil->count--;
if (pil->count == 0)
pil->desc->ops->shutdown(pil->desc);
-unlock:
mutex_unlock(&pil->lock);
pil_d = find_peripheral(pil->desc->depends_on);