|
@@ -1241,6 +1241,9 @@ static ssize_t store_protocols(struct device *device,
|
|
|
if (rc < 0)
|
|
|
goto out;
|
|
|
|
|
|
+ if (dev->driver_type == RC_DRIVER_IR_RAW)
|
|
|
+ ir_raw_load_modules(&new_protocols);
|
|
|
+
|
|
|
rc = dev->change_protocol(dev, &new_protocols);
|
|
|
if (rc < 0) {
|
|
|
dev_dbg(&dev->dev, "Error setting protocols to 0x%llx\n",
|
|
@@ -1248,9 +1251,6 @@ static ssize_t store_protocols(struct device *device,
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
- if (dev->driver_type == RC_DRIVER_IR_RAW)
|
|
|
- ir_raw_load_modules(&new_protocols);
|
|
|
-
|
|
|
if (new_protocols != old_protocols) {
|
|
|
*current_protocols = new_protocols;
|
|
|
dev_dbg(&dev->dev, "Protocols changed to 0x%llx\n",
|
|
@@ -1735,6 +1735,9 @@ static int rc_prepare_rx_device(struct rc_dev *dev)
|
|
|
if (dev->driver_type == RC_DRIVER_SCANCODE && !dev->change_protocol)
|
|
|
dev->enabled_protocols = dev->allowed_protocols;
|
|
|
|
|
|
+ if (dev->driver_type == RC_DRIVER_IR_RAW)
|
|
|
+ ir_raw_load_modules(&rc_proto);
|
|
|
+
|
|
|
if (dev->change_protocol) {
|
|
|
rc = dev->change_protocol(dev, &rc_proto);
|
|
|
if (rc < 0)
|
|
@@ -1742,9 +1745,6 @@ static int rc_prepare_rx_device(struct rc_dev *dev)
|
|
|
dev->enabled_protocols = rc_proto;
|
|
|
}
|
|
|
|
|
|
- if (dev->driver_type == RC_DRIVER_IR_RAW)
|
|
|
- ir_raw_load_modules(&rc_proto);
|
|
|
-
|
|
|
set_bit(EV_KEY, dev->input_dev->evbit);
|
|
|
set_bit(EV_REP, dev->input_dev->evbit);
|
|
|
set_bit(EV_MSC, dev->input_dev->evbit);
|