Skip to content

Commit 9d2f1d3

Browse files
Alphixmchehab
authored andcommitted
[media] rc-core: rename dev->scanmask to dev->scancode_mask
We already have dev->scancode_filter and dev->scancode_wakeup_filter so rename dev->scanmask to dev->scancode_mask for consistency. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
1 parent c5540fb commit 9d2f1d3

6 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎drivers/media/pci/cx88/cx88-input.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
478478
dev->priv = core;
479479
dev->open = cx88_ir_open;
480480
dev->close = cx88_ir_close;
481-
dev->scanmask = hardware_mask;
481+
dev->scancode_mask = hardware_mask;
482482

483483
if (ir->sampling) {
484484
dev->driver_type = RC_DRIVER_IR_RAW;

‎drivers/media/pci/ttpci/budget-ci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
234234
break;
235235
}
236236
if (!budget_ci->ir.full_rc5)
237-
dev->scanmask = 0xff;
237+
dev->scancode_mask = 0xff;
238238

239239
error = rc_register_device(dev);
240240
if (error) {

‎drivers/media/rc/rc-main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ static unsigned int ir_establish_scancode(struct rc_dev *dev,
285285
* IR tables from other remotes. So, we support specifying a mask to
286286
* indicate the valid bits of the scancodes.
287287
*/
288-
if (dev->scanmask)
289-
scancode &= dev->scanmask;
288+
if (dev->scancode_mask)
289+
scancode &= dev->scancode_mask;
290290

291291
/* First check if we already have a mapping for this ir command */
292292
for (i = 0; i < rc_map->len; i++) {

‎drivers/media/usb/cx231xx/cx231xx-input.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int cx231xx_ir_init(struct cx231xx *dev)
9191
dev->init_data.get_key = get_key_isdbt;
9292
dev->init_data.ir_codes = cx231xx_boards[dev->model].rc_map_name;
9393
/* The i2c micro-controller only outputs the cmd part of NEC protocol */
94-
dev->init_data.rc_dev->scanmask = 0xff;
94+
dev->init_data.rc_dev->scancode_mask = 0xff;
9595
dev->init_data.rc_dev->driver_name = "cx231xx";
9696
dev->init_data.type = RC_BIT_NEC;
9797
info.addr = 0x30;

‎drivers/media/usb/tm6000/tm6000-input.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ int tm6000_ir_init(struct tm6000_core *dev)
443443
/* input setup */
444444
rc->allowed_protocols = RC_BIT_RC5 | RC_BIT_NEC;
445445
/* Neded, in order to support NEC remotes with 24 or 32 bits */
446-
rc->scanmask = 0xffff;
446+
rc->scancode_mask = 0xffff;
447447
rc->priv = ir;
448448
rc->change_protocol = tm6000_ir_change_protocol;
449449
if (dev->int_in.endp) {

‎include/media/rc-core.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ enum rc_filter_type {
8080
* @enabled_wakeup_protocols: bitmask with the enabled RC_BIT_* wakeup protocols
8181
* @scancode_filter: scancode filter
8282
* @scancode_wakeup_filter: scancode wakeup filters
83-
* @scanmask: some hardware decoders are not capable of providing the full
83+
* @scancode_mask: some hardware decoders are not capable of providing the full
8484
* scancode to the application. As this is a hardware limit, we can't do
8585
* anything with it. Yet, as the same keycode table can be used with other
8686
* devices, a mask is provided to allow its usage. Drivers should generally
8787
* leave this field in blank
88+
* @users: number of current users of the device
8889
* @priv: driver-specific data
8990
* @keylock: protects the remaining members of the struct
9091
* @keypressed: whether a key is currently pressed
@@ -139,8 +140,8 @@ struct rc_dev {
139140
u64 enabled_wakeup_protocols;
140141
struct rc_scancode_filter scancode_filter;
141142
struct rc_scancode_filter scancode_wakeup_filter;
143+
u32 scancode_mask;
142144
u32 users;
143-
u32 scanmask;
144145
void *priv;
145146
spinlock_t keylock;
146147
bool keypressed;

0 commit comments

Comments
 (0)