diff options
Diffstat (limited to 'drivers/media/rc/rc-main.c')
-rw-r--r-- | drivers/media/rc/rc-main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 8d3b74c5a71..86ffcd54339 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -1298,8 +1298,7 @@ void rc_free_device(struct rc_dev *dev) if (!dev) return; - if (dev->input_dev) - input_free_device(dev->input_dev); + input_free_device(dev->input_dev); put_device(&dev->dev); @@ -1414,13 +1413,16 @@ int rc_register_device(struct rc_dev *dev) ir_raw_init(); raw_init = true; } + /* calls ir_register_device so unlock mutex here*/ + mutex_unlock(&dev->lock); rc = ir_raw_event_register(dev); + mutex_lock(&dev->lock); if (rc < 0) goto out_input; } if (dev->change_protocol) { - u64 rc_type = (1 << rc_map->rc_type); + u64 rc_type = (1ll << rc_map->rc_type); if (dev->driver_type == RC_DRIVER_IR_RAW) rc_type |= RC_BIT_LIRC; rc = dev->change_protocol(dev, &rc_type); |