wcte43x: Build against 2.6.18 and CentOS 5.5

This is to support users who are unable to update to the lastest CentOS 5.x.
There is no change for most users on the latest releases of their distribution.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
This commit is contained in:
Shaun Ruffell 2014-04-30 13:32:58 -05:00
parent 6649a3a166
commit a66db43356

View File

@ -51,6 +51,19 @@
#include "wcxb_spi.h" #include "wcxb_spi.h"
#include "wcxb_flash.h" #include "wcxb_flash.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
# ifdef RHEL_RELEASE_VERSION
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(5, 6)
# define T43X_HAVE_CANCEL_WORK_SYNC
# endif
# else
static inline int delayed_work_pending(struct work_struct *work)
{
return test_bit(0, &work->pending);
}
# endif
#endif
static const char *TE435_FW_FILENAME = "dahdi-fw-te435.bin"; static const char *TE435_FW_FILENAME = "dahdi-fw-te435.bin";
static const u32 TE435_VERSION = 0xe0019; static const u32 TE435_VERSION = 0xe0019;
@ -3477,7 +3490,12 @@ static void __devexit t43x_remove_one(struct pci_dev *pdev)
wc->vpm = NULL; wc->vpm = NULL;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
# ifdef T43X_HAVE_CANCEL_WORK_SYNC
cancel_work_sync(&wc->clksrc_work.work); cancel_work_sync(&wc->clksrc_work.work);
# else
cancel_delayed_work(&wc->clksrc_work.work);
flush_workqueue(wc->wq);
# endif
#else #else
cancel_delayed_work_sync(&wc->clksrc_work.work); cancel_delayed_work_sync(&wc->clksrc_work.work);
#endif #endif