Commit 876b10e2 authored by Raptor Engineering Development Team's avatar Raptor Engineering Development Team
Browse files

opvxa24xx: Fix build on various kernel versions

parent 524bb9b8
......@@ -2239,8 +2239,10 @@ static int a24xx_secondary_init(struct pci_dev *pdev)
/* set channel sigcap */
a24xx_post_initialize(wc);
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 6, 19)
// Enforce maximum sleep state latency of 10us to prevent modern deep idle CPU states from causing severe audio distortions
cpu_latency_qos_add_request(&wc_dev->pm_qos_req, 10);
#endif
init_busydetect(wc, opermode);
init_callerid(wc);
......@@ -2654,8 +2656,10 @@ static void __devexit a24xx_remove_one(struct pci_dev *pdev)
free_irq(pdev->irq, wc);
}
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 6, 19)
/* Remove CPU latency requirement */
cpu_latency_qos_remove_request(&wc_dev->pm_qos_req);
#endif
/* Immediately free resources */
dma_free_coherent(&pdev->dev, wc_dev->dma_buffer_size, (void *)wc_dev->writechunk, wc_dev->writedma);
......
......@@ -30,8 +30,11 @@
#define _OPVXA2410P_H
#include <dahdi/kernel.h>
#include <linux/pci.h>
#include <linux/firmware.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 6, 19)
#include <linux/pm_qos.h>
#endif
#ifndef SLIC_LF_OPEN
/* Proslic Linefeed options for register 64 - Linefeed Control */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment