From: Mauro Carvalho Chehab Date: Sun, 10 Aug 2014 00:47:08 +0000 (-0300) Subject: [media] au0828: handle IR int during suspend/resume X-Git-Tag: firefly_0821_release~176^2~2474^2~952 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=345e3bfdadf4ae12df6251d4bcb6b9fb48037690;p=firefly-linux-kernel-4.4.55.git [media] au0828: handle IR int during suspend/resume It doesn't make sense to handle an IR code given before suspending after the device resume. So, turn off IR int while suspending. 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 47ef07a693af..7a5437a4d938 100644 --- a/drivers/media/usb/au0828/au0828-input.c +++ b/drivers/media/usb/au0828/au0828-input.c @@ -380,6 +380,9 @@ int au0828_rc_suspend(struct au0828_dev *dev) cancel_delayed_work_sync(&ir->work); + /* Disable IR */ + au8522_rc_clear(ir, 0xe0, 1 << 4); + return 0; } @@ -390,6 +393,9 @@ int au0828_rc_resume(struct au0828_dev *dev) if (!ir) return 0; + /* Enable IR */ + au8522_rc_set(ir, 0xe0, 1 << 4); + schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling)); return 0;