Re: [PATCH v2] i2c: avoid sleep in IRQ context

2019-08-14 Thread Wolfram Sang
On Wed, Aug 07, 2019 at 03:18:07PM +0800, Fuqian Huang wrote: > i2c_pxa_handler -> i2c_pxa_irq_txempty -> > i2c_pxa_reset -> i2c_pxa_set_slave -> i2c_pxa_wait_slave > > As i2c_pxa_handler is an interrupt handler, it will finally > calls i2c_pxa_wait_slave which calls msleep. > > Add in_interrupt

[PATCH v2] i2c: avoid sleep in IRQ context

2019-08-07 Thread Fuqian Huang
i2c_pxa_handler -> i2c_pxa_irq_txempty -> i2c_pxa_reset -> i2c_pxa_set_slave -> i2c_pxa_wait_slave As i2c_pxa_handler is an interrupt handler, it will finally calls i2c_pxa_wait_slave which calls msleep. Add in_interrupt check before msleep to avoid sleep in IRQ context. When in interrupt context