Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357480
b: refs/heads/master
c: 9b4539b
h: refs/heads/master
v: v3
  • Loading branch information
Frank Schaefer authored and Mauro Carvalho Chehab committed Feb 5, 2013
1 parent e617663 commit 56d43f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d968cdaaec2ea994b2656c00b5a4f10d4159fe8
refs/heads/master: 9b4539bebb86310afdc5563653ec4475ae110088
18 changes: 5 additions & 13 deletions trunk/drivers/media/usb/em28xx/em28xx-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,30 +338,22 @@ static void em28xx_ir_handle_key(struct em28xx_IR *ir)
}
}

static void em28xx_i2c_ir_work(struct work_struct *work)
{
struct em28xx_IR *ir = container_of(work, struct em28xx_IR, work.work);

em28xx_i2c_ir_handle_key(ir);
schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling));
}

static void em28xx_ir_work(struct work_struct *work)
{
struct em28xx_IR *ir = container_of(work, struct em28xx_IR, work.work);

em28xx_ir_handle_key(ir);
if (ir->i2c_dev_addr) /* external i2c device */
em28xx_i2c_ir_handle_key(ir);
else /* internal device */
em28xx_ir_handle_key(ir);
schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling));
}

static int em28xx_ir_start(struct rc_dev *rc)
{
struct em28xx_IR *ir = rc->priv;

if (ir->i2c_dev_addr) /* external i2c device */
INIT_DELAYED_WORK(&ir->work, em28xx_i2c_ir_work);
else /* internal device */
INIT_DELAYED_WORK(&ir->work, em28xx_ir_work);
INIT_DELAYED_WORK(&ir->work, em28xx_ir_work);
schedule_delayed_work(&ir->work, 0);

return 0;
Expand Down

0 comments on commit 56d43f5

Please sign in to comment.