diff --git a/drivers/dahdi/voicebus/voicebus.h b/drivers/dahdi/voicebus/voicebus.h index faece9a..2eb1146 100644 --- a/drivers/dahdi/voicebus/voicebus.h +++ b/drivers/dahdi/voicebus/voicebus.h @@ -64,7 +64,11 @@ * platform does not support it. * */ -#undef CONFIG_VOICEBUS_DISABLE_ASPM +#ifdef CONFIG_VOICEBUS_DISABLE_ASPM +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) +#include +#endif +#endif /* Define this to use a FIFO for the software echocan reference. * (experimental) */ diff --git a/drivers/dahdi/wcaxx-base.c b/drivers/dahdi/wcaxx-base.c index b934960..8903e5d 100644 --- a/drivers/dahdi/wcaxx-base.c +++ b/drivers/dahdi/wcaxx-base.c @@ -67,6 +67,12 @@ #include "wcxb_spi.h" #include "wcxb_flash.h" +#ifdef CONFIG_VOICEBUS_DISABLE_ASPM +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) +#include +#endif +#endif + /*! * \brief Default ringer debounce (in ms) */ diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 7089ec1..ad35569 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -87,6 +87,12 @@ */ /* #define CONFIG_WCT4XXP_DISABLE_ASPM */ +#ifdef CONFIG_WCT4XXP_DISABLE_ASPM +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) +#include +#endif +#endif + #if defined(CONFIG_FORCE_EXTENDED_RESET) && defined(CONFIG_NOEXTENDED_RESET) #error "You cannot define both CONFIG_FORCE_EXTENDED_RESET and " \ "CONFIG_NOEXTENDED_RESET." diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 22b9b66..cf629eb 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -58,10 +58,6 @@ #include -#ifdef CONFIG_PCI -#include -#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) #define HAVE_NET_DEVICE_OPS #endif