summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/b2c2
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/dvb/b2c2
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/dvb/b2c2')
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-pci.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-pci.c b/linux/drivers/media/dvb/b2c2/flexcop-pci.c
index e6362f304..648f319b2 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-pci.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-pci.c
@@ -63,7 +63,11 @@ struct flexcop_pci {
unsigned long last_irq;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct work_struct irq_check_work;
+#else
+ struct delayed_work irq_check_work;
+#endif
struct flexcop_device *fc_dev;
};
@@ -97,9 +101,18 @@ static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_regi
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void flexcop_pci_irq_check_work(void *data)
+#else
+static void flexcop_pci_irq_check_work(struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct flexcop_pci *fc_pci = data;
+#else
+ struct flexcop_pci *fc_pci =
+ container_of(work, struct flexcop_pci, irq_check_work.work);
+#endif
struct flexcop_device *fc = fc_pci->fc_dev;
flexcop_ibi_value v = fc->read_ibi_reg(fc,sram_dest_reg_714);
@@ -375,7 +388,11 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
if ((ret = flexcop_pci_dma_init(fc_pci)) != 0)
goto err_fc_exit;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work, fc_pci);
+#else
+ INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work);
+#endif
return ret;