dahdi: timer_setup was backported in RHEL 7.6

Since Red Hat Linux backported the new timer_setup definition in 7.6, we
need to make sure to not define it ourselves when building against this
kernel.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This commit is contained in:
Shaun Ruffell 2019-03-06 14:41:58 +00:00
parent 60aaff1289
commit 8c8b9b6df0

View File

@ -1412,6 +1412,15 @@ static inline short dahdi_txtone_nextsample(struct dahdi_chan *ss)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#ifdef RHEL_RELEASE_VERSION
#if RHEL_RELEASE_CODE > RHEL_RELEASE_VERSION(7, 5)
#define DAHDI_HAVE_TIMER_SETUP
#undef TIMER_DATA_TYPE
#define TIMER_DATA_TYPE struct timer_list *
#endif
#endif
#ifndef DAHDI_HAVE_TIMER_SETUP
/** /**
* timer_setup - Added in 4.13.0. We can make a direct translation to the * timer_setup - Added in 4.13.0. We can make a direct translation to the
* setup_timer interface since DAHDI does not pass any flags to any of the * setup_timer interface since DAHDI does not pass any flags to any of the
@ -1431,6 +1440,8 @@ timer_setup(struct timer_list *timer,
container_of((struct timer_list *)(callback_timer), \ container_of((struct timer_list *)(callback_timer), \
typeof(*var), timer_fieldname) typeof(*var), timer_fieldname)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
#define refcount_read atomic_read #define refcount_read atomic_read
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)