summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra20_spdif.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-06-06 17:15:05 -0600
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-08 07:03:05 +0800
commitc92a40e3a163b6708e0dd82ba4612f79df846912 (patch)
tree0a5cf29998b4d217b4d43c7eaf0bfe4428a140eb /sound/soc/tegra/tegra20_spdif.c
parent40db77a0c4223d0b87c4b61ae38760d47593b7a5 (diff)
ASoC: tegra: use DAI's not card's dev for dev_err
This is the actual device of the I2S or SPDIF controller reporting the problem. If a future change converts these controllers to be CODECs, then there may be no pcm associated with the substream, so this change avoids a crash. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra/tegra20_spdif.c')
-rw-r--r--sound/soc/tegra/tegra20_spdif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index ffbd99c4106e..f774a2d5e585 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -77,7 +77,7 @@ static int tegra20_spdif_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
- struct device *dev = substream->pcm->card->dev;
+ struct device *dev = dai->dev;
struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai);
int ret, spdifclock;