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>
This commit is contained in:
Matt Wagantall
2012-02-08 14:09:11 -08:00
parent 4478561233
commit 39f90cbfbe

View File

@@ -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 * 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 * it under the terms of the GNU General Public License version 2 and
@@ -288,14 +288,10 @@ void pil_put(void *peripheral_handle)
mutex_lock(&pil->lock); mutex_lock(&pil->lock);
WARN(!pil->count, "%s: Reference count mismatch\n", __func__); WARN(!pil->count, "%s: Reference count mismatch\n", __func__);
/* TODO: Peripheral shutdown support */
if (pil->count == 1)
goto unlock;
if (pil->count) if (pil->count)
pil->count--; pil->count--;
if (pil->count == 0) if (pil->count == 0)
pil->desc->ops->shutdown(pil->desc); pil->desc->ops->shutdown(pil->desc);
unlock:
mutex_unlock(&pil->lock); mutex_unlock(&pil->lock);
pil_d = find_peripheral(pil->desc->depends_on); pil_d = find_peripheral(pil->desc->depends_on);