diff options
author | Christian Hemp <c.hemp@phytec.de> | 2013-10-31 16:09:03 +0100 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2014-05-14 14:13:28 -0400 |
commit | ba32db9160e8c963764658e0c277391ffb2a1f38 (patch) | |
tree | cccf31519e4f3f87d2e30990f797fac94957a456 | |
parent | c8a1512bce82709d2b13faad86f9297e825e2548 (diff) |
ipu3: fix wrong clk use counter
if the interrupthandler has already been installed,
we need to release the clock for the use counter not to runover
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
-rw-r--r-- | drivers/mxc/ipu3/ipu_common.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mxc/ipu3/ipu_common.c b/drivers/mxc/ipu3/ipu_common.c index 9c47cd91ff3f..de6d18fa4a58 100644 --- a/drivers/mxc/ipu3/ipu_common.c +++ b/drivers/mxc/ipu3/ipu_common.c @@ -2585,6 +2585,7 @@ int ipu_request_irq(struct ipu_soc *ipu, uint32_t irq, { uint32_t reg; unsigned long lock_flags; + int ret = 0; BUG_ON(irq >= IPU_IRQ_COUNT); @@ -2595,8 +2596,8 @@ int ipu_request_irq(struct ipu_soc *ipu, uint32_t irq, if (ipu->irq_list[irq].handler != NULL) { dev_err(ipu->dev, "handler already installed on irq %d\n", irq); - spin_unlock_irqrestore(&ipu->int_reg_spin_lock, lock_flags); - return -EINVAL; + ret = -EINVAL; + goto err; } ipu->irq_list[irq].handler = handler; @@ -2611,11 +2612,13 @@ int ipu_request_irq(struct ipu_soc *ipu, uint32_t irq, reg |= IPUIRQ_2_MASK(irq); ipu_cm_write(ipu, reg, IPUIRQ_2_CTRLREG(irq)); + +err: spin_unlock_irqrestore(&ipu->int_reg_spin_lock, lock_flags); _ipu_put(ipu); - return 0; + return ret; } EXPORT_SYMBOL(ipu_request_irq); |