diff options
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-input.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-input.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index a5e4b7b50..6c712ecdd 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -146,9 +146,17 @@ static void ir_timer(unsigned long data) schedule_work(&ir->work); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) static void cx88_ir_work(void *data) +#else +static void cx88_ir_work(struct work_struct *work) +#endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) struct cx88_IR *ir = data; +#else + struct cx88_IR *ir = container_of(work, struct cx88_IR, work); +#endif unsigned long timeout; cx88_ir_handle_key(ir); @@ -159,7 +167,11 @@ static void cx88_ir_work(void *data) static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir) { if (ir->polling) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) INIT_WORK(&ir->work, cx88_ir_work, ir); +#else + INIT_WORK(&ir->work, cx88_ir_work); +#endif init_timer(&ir->timer); ir->timer.function = ir_timer; ir->timer.data = (unsigned long)ir; |