diff options
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index 5fbb70c80..1a86adbfa 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c @@ -19,9 +19,18 @@ * * TODO: Fix the repeat rate of the input device. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) static void dvb_usb_read_remote_control(void *data) +#else +static void dvb_usb_read_remote_control(struct work_struct *work) +#endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) struct dvb_usb_device *d = data; +#else + struct dvb_usb_device *d = + container_of(work, struct dvb_usb_device, rc_query_work.work); +#endif u32 event; int state; @@ -145,7 +154,11 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) d->rc_input_dev = input_dev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) INIT_WORK(&d->rc_query_work, dvb_usb_read_remote_control, d); +#else + INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); +#endif info("schedule remote query interval to %d msecs.", d->props.rc_interval); schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval)); |