From 39f90cbfbe87eb4195c0206f7db617723025fdb9 Mon Sep 17 00:00:00 2001 From: Matt Wagantall Date: Wed, 8 Feb 2012 14:09:11 -0800 Subject: [PATCH] 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 --- arch/arm/mach-msm/peripheral-loader.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm/mach-msm/peripheral-loader.c b/arch/arm/mach-msm/peripheral-loader.c index 0886975c9f4..1004e013513 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 @@ void pil_put(void *peripheral_handle) 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);