sst: tweak the shared functions so we don't crash the ASoC driver
authorAlan Cox <alan@linux.intel.com>
Wed, 11 May 2011 13:38:26 +0000 (14:38 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 May 2011 21:01:45 +0000 (14:01 -0700)
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 <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/intel_sst/intel_sst_drv_interface.c

index bb64f2a767f8de8fd56c63a366d7c34b2d5c9217..308d1c3ec40a3eb339914aa730a395d4163c0012 100644 (file)
@@ -527,7 +527,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);