diff options
Diffstat (limited to 'linux/drivers/media/dvb/b2c2/flexcop-pci.c')
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-pci.c | 17 |
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; |