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 <m.che...@samsung.com>
---
 drivers/media/usb/au0828/au0828-input.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/usb/au0828/au0828-input.c 
b/drivers/media/usb/au0828/au0828-input.c
index f8631b9b33d6..4e2c26a5b004 100644
--- a/drivers/media/usb/au0828/au0828-input.c
+++ b/drivers/media/usb/au0828/au0828-input.c
@@ -383,6 +383,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;
 }
 
@@ -393,6 +396,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;
-- 
1.9.3

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

Reply via email to