summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-12-16 18:29:03 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-16 18:29:03 -0200
commit44588fb487e94e330e9ea9da744cb35e7f14dc96 (patch)
treed1bcfa03e7ac8c5d1d327aca0023f43ed3f76651 /linux/drivers/media/video/pvrusb2
parent35098755c90373eb932f02f71ec986e9d4a6f49b (diff)
downloadmediapointer-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/pvrusb2')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
index f129f316d..19787dc81 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -45,16 +45,33 @@ static void pvr2_context_trigger_poll(struct pvr2_context *mp)
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void pvr2_context_poll(struct pvr2_context *mp)
+#else
+static void pvr2_context_poll(struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+ struct pvr2_context *mp =
+ container_of(work, struct pvr2_context, workpoll);
+#endif
pvr2_context_enter(mp); do {
pvr2_hdw_poll(mp->hdw);
} while (0); pvr2_context_exit(mp);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void pvr2_context_setup(struct pvr2_context *mp)
+#else
+static void pvr2_context_setup(struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+ struct pvr2_context *mp =
+ container_of(work, struct pvr2_context, workinit);
+
+#endif
pvr2_context_enter(mp); do {
if (!pvr2_hdw_dev_ok(mp->hdw)) break;
pvr2_hdw_setup(mp->hdw);
@@ -92,8 +109,13 @@ struct pvr2_context *pvr2_context_create(
}
mp->workqueue = create_singlethread_workqueue("pvrusb2");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&mp->workinit,(void (*)(void*))pvr2_context_setup,mp);
INIT_WORK(&mp->workpoll,(void (*)(void*))pvr2_context_poll,mp);
+#else
+ INIT_WORK(&mp->workinit, pvr2_context_setup);
+ INIT_WORK(&mp->workpoll, pvr2_context_poll);
+#endif
queue_work(mp->workqueue,&mp->workinit);
done:
return mp;