ASoC: Intel: Remove sst_dsp_get_thread_context

While sst_dsp_get_thread_context() is declared as solution-agnostic, it
is only used by /skylake/ solution. Majority of thread_context field
usages are direct accesses. Improve code cohesiveness and convert to
single usage model.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://lore.kernel.org/r/20201006064907.16277-14-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Cezary Rojewski 2020-10-06 08:49:07 +02:00 committed by Mark Brown
parent 720811f0e4
commit eb062e47f7
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
3 changed files with 2 additions and 7 deletions

View File

@ -98,9 +98,4 @@ struct sst_dsp {
struct snd_dma_buffer dmab; struct snd_dma_buffer dmab;
}; };
static inline void *sst_dsp_get_thread_context(struct sst_dsp *sst)
{
return sst->thread_context;
}
#endif #endif

View File

@ -311,7 +311,7 @@ static struct sst_ops cnl_ops = {
static irqreturn_t cnl_dsp_irq_thread_handler(int irq, void *context) static irqreturn_t cnl_dsp_irq_thread_handler(int irq, void *context)
{ {
struct sst_dsp *dsp = context; struct sst_dsp *dsp = context;
struct skl_dev *cnl = sst_dsp_get_thread_context(dsp); struct skl_dev *cnl = dsp->thread_context;
struct sst_generic_ipc *ipc = &cnl->ipc; struct sst_generic_ipc *ipc = &cnl->ipc;
struct skl_ipc_header header = {0}; struct skl_ipc_header header = {0};
u32 hipcida, hipctdr, hipctdd; u32 hipcida, hipctdr, hipctdd;

View File

@ -489,7 +489,7 @@ void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
irqreturn_t skl_dsp_irq_thread_handler(int irq, void *context) irqreturn_t skl_dsp_irq_thread_handler(int irq, void *context)
{ {
struct sst_dsp *dsp = context; struct sst_dsp *dsp = context;
struct skl_dev *skl = sst_dsp_get_thread_context(dsp); struct skl_dev *skl = dsp->thread_context;
struct sst_generic_ipc *ipc = &skl->ipc; struct sst_generic_ipc *ipc = &skl->ipc;
struct skl_ipc_header header = {0}; struct skl_ipc_header header = {0};
u32 hipcie, hipct, hipcte; u32 hipcie, hipct, hipcte;