[PATCH v1 07/49] USB: misc: uss720: prepare for enabling irq in complete()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Complete() will be run with interrupt enabled, so prepare for
the comming change.

Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxxxxx>
---
 drivers/usb/misc/uss720.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index 40ef40a..b2e76fa 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -132,8 +132,13 @@ static void async_complete(struct urb *urb)
 			(unsigned int)priv->reg[6]);
 #endif
 		/* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
-		if (rq->reg[2] & rq->reg[1] & 0x10 && pp)
+		if (rq->reg[2] & rq->reg[1] & 0x10 && pp) {
+			unsigned long flags;
+
+			local_irq_save(flags);
 			parport_generic_irq(pp);
+			local_irq_restore(flags);
+		}
 	}
 	complete(&rq->compl);
 	kref_put(&rq->ref_count, destroy_async);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux