diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-16 18:29:03 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-16 18:29:03 -0200 |
commit | 44588fb487e94e330e9ea9da744cb35e7f14dc96 (patch) | |
tree | d1bcfa03e7ac8c5d1d327aca0023f43ed3f76651 /linux/drivers/media/dvb/dvb-usb | |
parent | 35098755c90373eb932f02f71ec986e9d4a6f49b (diff) | |
download | mediapointer-dvb-s2-44588fb487e94e330e9ea9da744cb35e7f14dc96.tar.gz mediapointer-dvb-s2-44588fb487e94e330e9ea9da744cb35e7f14dc96.tar.bz2 |
Several stuff backported from 2.6.19-git series
From: Mauro Carvalho Chehab <mchehab@infradead.org>
- INIT_WORK replaced by INIT_DELAYED_WORK
- struct work_struct replaced by struct delayed_work
- callback parameters also changed
- SLAB_KERNEL replaced by GFP_KERNEL
- linux/suspend.h replaced by linux/freezer.h
- on cpia: INIT_WORK replaced by INIT_WORK_NAR
- file->f_dentry->d_inode replaced by file->f_path.dentry->d_inode
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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; |