sst: tweak the shared functions so we don't crash the ASoC driver
PATCH 1/1 sst: tweak the shared functions so we don't crash the ASoC driver
From: Alan Cox <[email protected]>
The ASoC driver is currently pulling bits from staging rather than its own copy. Post all the merges and fixes we've put back an assumption that crashes ASoC so we need to fix it differently.
(See 0ed625b2f2751c249417bd28694e37ef48eb5fbb)
Signed-off-by Alan Cox <[email protected]>
---
.../staging/intel_sst/intel_sst_drv_interface.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/staging/intel_sst/intel_sst_drv_interface.c +3 -1
@@ -526,7 +526,9 @@ int register_sst_card(struct intel_sst_card_ops *card)pr_err ("Repeat for registration..denied\n" );return -EBADRQC ; } - sst_drv_ctx->scard_ops->card_status =SND_CARD_UN_INIT ; +/* The ASoC code doesn't set scard_ops */ +if (sst_drv_ctx->scard_ops) + sst_drv_ctx->scard_ops->card_status =SND_CARD_UN_INIT ;return 0 ; }EXPORT_SYMBOL_GPL (register_sst_card);