diff options
Diffstat (limited to 'wctc4xxp')
-rw-r--r-- | wctc4xxp/base.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/wctc4xxp/base.c b/wctc4xxp/base.c index 46fac4d..b7138e3 100644 --- a/wctc4xxp/base.c +++ b/wctc4xxp/base.c @@ -340,8 +340,6 @@ struct wcdte { struct zt_transcoder *udecode; }; -static void dte_wque_run(struct wcdte *wc); - struct wcdte_desc { char *name; int flags; @@ -1015,8 +1013,15 @@ static void wcdte_init_descriptors(struct wcdte *wc) } } -static void dte_wque_run(struct wcdte *wc) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) +static void dte_wque_run(struct work_struct *work) +{ + struct wcdte *wc = container_of(work, struct wcdte, dte_work); +#else +static void dte_wque_run(void *work_data) { + struct wcdte *wc = work_data; +#endif int res; if (wc->wqueints & 0x00000040) { @@ -1534,7 +1539,12 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic /* Initialize the work queue */ wc->dte_wq = create_workqueue("tc400b"); - INIT_WORK(&wc->dte_work, (void (*)(void *))dte_wque_run, wc); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) + INIT_WORK(&wc->dte_work, dte_wque_run); +#else + INIT_WORK(&wc->dte_work, dte_wque_run, wc); +#endif + #ifdef HOTPLUG_FIRMWARE if ((request_firmware(&firmware, dte_firmware, &wc->dev->dev) != 0) || !firmware) { printk("TC400B: firmware %s not available from userspace\n", dte_firmware); @@ -1550,7 +1560,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic else min_numchannels = g729_numchannels; - /* Setup Encoders nad Decoders */ + /* Setup Encoders and Decoders */ if (!mode || strlen(mode) < 4) { |