summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvision
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/usbvision
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/usbvision')
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-core.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c
index 071b11e75..2d20c809d 100644
--- a/linux/drivers/media/video/usbvision/usbvision-core.c
+++ b/linux/drivers/media/video/usbvision/usbvision-core.c
@@ -2286,14 +2286,23 @@ int usbvision_power_on(struct usb_usbvision *usbvision)
*/
// to call usbvision_power_off from task queue
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void call_usbvision_power_off(void *_usbvision)
+#else
+static void call_usbvision_power_off(struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct usb_usbvision *usbvision = _usbvision;
+#else
+ struct usb_usbvision *usbvision = container_of(work, struct usb_usbvision, powerOffWork);
+#endif
PDEBUG(DBG_FUNC, "");
down_interruptible(&usbvision->lock);
if(usbvision->user == 0) {
usbvision_i2c_usb_del_bus(&usbvision->i2c_adap);
+
usbvision_power_off(usbvision);
usbvision->initialized = 0;
}
@@ -2310,7 +2319,11 @@ static void usbvision_powerOffTimer(unsigned long data)
INIT_TQUEUE(&usbvision->powerOffTask, call_usbvision_power_off, usbvision);
(void) schedule_task(&usbvision->powerOffTask);
#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off, usbvision);
+#else
+ INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off);
+#endif
(void) schedule_work(&usbvision->powerOffWork);
#endif