Skip to content

Commit

Permalink
[media] rc-core: simplify sysfs code
Browse files Browse the repository at this point in the history
Simplify and cleanup the sysfs code a bit.

[m.chehab@samsung.com: rebased and fixed a CodingStyle issue]
Signed-off-by: David Härdeman <david@hardeman.nu>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
David Härdeman authored and Mauro Carvalho Chehab committed Jul 24, 2014
1 parent 0bc56cb commit da6e162
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 121 deletions.
7 changes: 7 additions & 0 deletions drivers/media/rc/ir-raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ ir_raw_get_allowed_protocols(void)
return protocols;
}

static int change_protocol(struct rc_dev *dev, u64 *rc_type)
{
/* the caller will update dev->enabled_protocols */
return 0;
}

/*
* Used to (un)register raw event clients
*/
Expand All @@ -257,6 +263,7 @@ int ir_raw_event_register(struct rc_dev *dev)

dev->raw->dev = dev;
rc_set_enabled_protocols(dev, ~0);
dev->change_protocol = change_protocol;
rc = kfifo_alloc(&dev->raw->kfifo,
sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE,
GFP_KERNEL);
Expand Down
Loading

0 comments on commit da6e162

Please sign in to comment.