mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
media: cec-pin: fix irq handling
The free_irq() function could be called from interrupt context, which is invalid. Move this to the thread. In the interrupt handler we just request that the thread disables the irq. This is done through an atomic so we don't need to add any spinlocks. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
9a6b2a8740
commit
cb74749493
2 changed files with 26 additions and 14 deletions
|
|
@ -113,6 +113,10 @@ struct cec_pin_ops {
|
|||
|
||||
#define CEC_NUM_PIN_EVENTS 128
|
||||
|
||||
#define CEC_PIN_IRQ_UNCHANGED 0
|
||||
#define CEC_PIN_IRQ_DISABLE 1
|
||||
#define CEC_PIN_IRQ_ENABLE 2
|
||||
|
||||
struct cec_pin {
|
||||
struct cec_adapter *adap;
|
||||
const struct cec_pin_ops *ops;
|
||||
|
|
@ -137,8 +141,8 @@ struct cec_pin {
|
|||
|
||||
struct cec_msg work_rx_msg;
|
||||
u8 work_tx_status;
|
||||
bool work_enable_irq;
|
||||
ktime_t work_tx_ts;
|
||||
atomic_t work_irq_change;
|
||||
atomic_t work_pin_events;
|
||||
unsigned int work_pin_events_wr;
|
||||
unsigned int work_pin_events_rd;
|
||||
|
|
|
|||
Loading…
Reference in a new issue