Merge "msm: pil: Allow pil_put() to shutdown peripherals" into msm-3.0
This commit is contained in:
committed by
QuIC Gerrit Code Review
commit
5220d82b98
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user