diff options
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 13 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb.h | 4 |
2 files changed, 17 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)); diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h index 883496c00..6ec8e4510 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h @@ -380,7 +380,11 @@ struct dvb_usb_device { /* remote control */ struct input_dev *rc_input_dev; char rc_phys[64]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) struct work_struct rc_query_work; +#else + struct delayed_work rc_query_work; +#endif u32 last_event; int last_state; |