rc-main.c (30596ec32e2cd141d73ee8701386887def9e98c0) | rc-main.c (a86d6df84ae6eb1fd1ca6cbd03f16637674a6af8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// rc-main.c - Remote Controller core module 3// 4// Copyright (C) 2009-2010 by Mauro Carvalho Chehab 5 6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 7 8#include <media/rc-core.h> --- 1227 unchanged lines hidden (view full) --- 1236 mutex_lock(&dev->lock); 1237 1238 old_protocols = *current_protocols; 1239 new_protocols = old_protocols; 1240 rc = parse_protocol_change(dev, &new_protocols, buf); 1241 if (rc < 0) 1242 goto out; 1243 | 1// SPDX-License-Identifier: GPL-2.0 2// rc-main.c - Remote Controller core module 3// 4// Copyright (C) 2009-2010 by Mauro Carvalho Chehab 5 6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 7 8#include <media/rc-core.h> --- 1227 unchanged lines hidden (view full) --- 1236 mutex_lock(&dev->lock); 1237 1238 old_protocols = *current_protocols; 1239 new_protocols = old_protocols; 1240 rc = parse_protocol_change(dev, &new_protocols, buf); 1241 if (rc < 0) 1242 goto out; 1243 |
1244 if (dev->driver_type == RC_DRIVER_IR_RAW) 1245 ir_raw_load_modules(&new_protocols); 1246 |
|
1244 rc = dev->change_protocol(dev, &new_protocols); 1245 if (rc < 0) { 1246 dev_dbg(&dev->dev, "Error setting protocols to 0x%llx\n", 1247 (long long)new_protocols); 1248 goto out; 1249 } 1250 | 1247 rc = dev->change_protocol(dev, &new_protocols); 1248 if (rc < 0) { 1249 dev_dbg(&dev->dev, "Error setting protocols to 0x%llx\n", 1250 (long long)new_protocols); 1251 goto out; 1252 } 1253 |
1251 if (dev->driver_type == RC_DRIVER_IR_RAW) 1252 ir_raw_load_modules(&new_protocols); 1253 | |
1254 if (new_protocols != old_protocols) { 1255 *current_protocols = new_protocols; 1256 dev_dbg(&dev->dev, "Protocols changed to 0x%llx\n", 1257 (long long)new_protocols); 1258 } 1259 1260 /* 1261 * If a protocol change was attempted the filter may need updating, even --- 468 unchanged lines hidden (view full) --- 1730 if (rc) 1731 return rc; 1732 1733 rc_proto = BIT_ULL(rc_map->rc_proto); 1734 1735 if (dev->driver_type == RC_DRIVER_SCANCODE && !dev->change_protocol) 1736 dev->enabled_protocols = dev->allowed_protocols; 1737 | 1254 if (new_protocols != old_protocols) { 1255 *current_protocols = new_protocols; 1256 dev_dbg(&dev->dev, "Protocols changed to 0x%llx\n", 1257 (long long)new_protocols); 1258 } 1259 1260 /* 1261 * If a protocol change was attempted the filter may need updating, even --- 468 unchanged lines hidden (view full) --- 1730 if (rc) 1731 return rc; 1732 1733 rc_proto = BIT_ULL(rc_map->rc_proto); 1734 1735 if (dev->driver_type == RC_DRIVER_SCANCODE && !dev->change_protocol) 1736 dev->enabled_protocols = dev->allowed_protocols; 1737 |
1738 if (dev->driver_type == RC_DRIVER_IR_RAW) 1739 ir_raw_load_modules(&rc_proto); 1740 |
|
1738 if (dev->change_protocol) { 1739 rc = dev->change_protocol(dev, &rc_proto); 1740 if (rc < 0) 1741 goto out_table; 1742 dev->enabled_protocols = rc_proto; 1743 } 1744 | 1741 if (dev->change_protocol) { 1742 rc = dev->change_protocol(dev, &rc_proto); 1743 if (rc < 0) 1744 goto out_table; 1745 dev->enabled_protocols = rc_proto; 1746 } 1747 |
1745 if (dev->driver_type == RC_DRIVER_IR_RAW) 1746 ir_raw_load_modules(&rc_proto); 1747 | |
1748 set_bit(EV_KEY, dev->input_dev->evbit); 1749 set_bit(EV_REP, dev->input_dev->evbit); 1750 set_bit(EV_MSC, dev->input_dev->evbit); 1751 set_bit(MSC_SCAN, dev->input_dev->mscbit); 1752 if (dev->open) 1753 dev->input_dev->open = ir_open; 1754 if (dev->close) 1755 dev->input_dev->close = ir_close; --- 249 unchanged lines hidden --- | 1748 set_bit(EV_KEY, dev->input_dev->evbit); 1749 set_bit(EV_REP, dev->input_dev->evbit); 1750 set_bit(EV_MSC, dev->input_dev->evbit); 1751 set_bit(MSC_SCAN, dev->input_dev->mscbit); 1752 if (dev->open) 1753 dev->input_dev->open = ir_open; 1754 if (dev->close) 1755 dev->input_dev->close = ir_close; --- 249 unchanged lines hidden --- |