sound: tegra-safety: Fix build for Linux v5.17+

Starting with Linux kernel v5.17, the 'slave_id' member is removed from
the DMA Engine 'dma_slave_config' structure. Building the Tegra Safety
Audio driver against Linux v5.17, v5.18 and v5.19 breaks because this
filed is not defined. There are already comments in the driver to not
used the 'slave_id' field and move to using device-tree to get this
information. For now, fix the build by not using the 'slave_id' field
for Linux v5.17+.

Bug 3820317
Bug 3735757

Change-Id: I2fb8317604b0a797f4e1b22a53994ec0085ea584
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2796900
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2022-10-23 10:46:50 +01:00
committed by mobile promotions
parent 6d2a57d57b
commit ded768ff77
2 changed files with 4 additions and 2 deletions

View File

@@ -13,6 +13,7 @@
#include <linux/dmaengine.h>
#include <linux/clk.h>
#include <linux/reset.h>
#include <linux/version.h>
#include "tegra_i2s.h"
@@ -455,7 +456,10 @@ static int gpcdma_hw_params(struct snd_pcm_substream *substream,
slave_config.src_maxburst = 2;
}
#if (KERNEL_VERSION(5, 17, 0) > LINUX_VERSION_CODE)
//TODO: Read from DT later on
slave_config.slave_id = dma_data->req_sel;
#endif
ret = dmaengine_slave_config(chan, &slave_config);
if (ret < 0) {