From: Mauro Carvalho Chehab Date: Sun, 10 Aug 2014 00:47:07 +0000 (-0300) Subject: [media] au0828: avoid race conditions at RC stop X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9018af0b8897b02dc8e83e6cd75391afcadf894;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] au0828: avoid race conditions at RC stop As the RC kthread can re-enable IR int, we should first cancel the kthread and then disable IR int. While here, remove a temporary debug printk. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/au0828/au0828-input.c b/drivers/media/usb/au0828/au0828-input.c index f0c5672e5f56..47ef07a693af 100644 --- a/drivers/media/usb/au0828/au0828-input.c +++ b/drivers/media/usb/au0828/au0828-input.c @@ -253,10 +253,10 @@ static void au0828_rc_stop(struct rc_dev *rc) { struct au0828_rc *ir = rc->priv; + cancel_delayed_work_sync(&ir->work); + /* Disable IR */ au8522_rc_clear(ir, 0xe0, 1 << 4); - - cancel_delayed_work_sync(&ir->work); } static int au0828_probe_i2c_ir(struct au0828_dev *dev)