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/video/saa7134 | |
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/video/saa7134')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-empress.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index 690891588..8c12c2cc2 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -353,9 +353,18 @@ static struct video_device saa7134_empress_template = .minor = -1, }; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) static void empress_signal_update(void* data) +#else +static void empress_signal_update(struct work_struct *work) +#endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) struct saa7134_dev* dev = (struct saa7134_dev*) data; +#else + struct saa7134_dev* dev = + container_of(work, struct saa7134_dev, empress_workqueue); +#endif if (dev->nosignal) { dprintk("no video signal\n"); @@ -390,7 +399,11 @@ static int empress_init(struct saa7134_dev *dev) "%s empress (%s)", dev->name, saa7134_boards[dev->board].name); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) INIT_WORK(&dev->empress_workqueue, empress_signal_update, (void*) dev); +#else + INIT_WORK(&dev->empress_workqueue, empress_signal_update); +#endif err = video_register_device(dev->empress_dev,VFL_TYPE_GRABBER, empress_nr[dev->nr]); @@ -411,7 +424,11 @@ static int empress_init(struct saa7134_dev *dev) sizeof(struct saa7134_buf), dev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) empress_signal_update(dev); +#else + empress_signal_update(&dev->empress_workqueue); +#endif return 0; } |