|
|
@@ -129,6 +129,10 @@ static int au0828_get_key_au8522(struct au0828_rc *ir)
|
|
|
int prv_bit, bit, width;
|
|
|
bool first = true;
|
|
|
|
|
|
+ /* do nothing if device is disconnected */
|
|
|
+ if (ir->dev->dev_state == DEV_DISCONNECTED)
|
|
|
+ return 0;
|
|
|
+
|
|
|
/* Check IR int */
|
|
|
rc = au8522_rc_read(ir, 0xe1, -1, buf, 1);
|
|
|
if (rc < 0 || !(buf[0] & (1 << 4))) {
|
|
|
@@ -255,8 +259,11 @@ static void au0828_rc_stop(struct rc_dev *rc)
|
|
|
|
|
|
cancel_delayed_work_sync(&ir->work);
|
|
|
|
|
|
- /* Disable IR */
|
|
|
- au8522_rc_clear(ir, 0xe0, 1 << 4);
|
|
|
+ /* do nothing if device is disconnected */
|
|
|
+ if (ir->dev->dev_state != DEV_DISCONNECTED) {
|
|
|
+ /* Disable IR */
|
|
|
+ au8522_rc_clear(ir, 0xe0, 1 << 4);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static int au0828_probe_i2c_ir(struct au0828_dev *dev)
|