diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-06-06 19:15:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-07 19:03:05 -0400 |
commit | c92a40e3a163b6708e0dd82ba4612f79df846912 (patch) | |
tree | 0a5cf29998b4d217b4d43c7eaf0bfe4428a140eb /sound/soc/tegra/tegra30_i2s.c | |
parent | 40db77a0c4223d0b87c4b61ae38760d47593b7a5 (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/tegra30_i2s.c')
-rw-r--r-- | sound/soc/tegra/tegra30_i2s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index 9c5c0e6819eb..2327f62e8a8c 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c | |||
@@ -181,7 +181,7 @@ static int tegra30_i2s_hw_params(struct snd_pcm_substream *substream, | |||
181 | struct snd_pcm_hw_params *params, | 181 | struct snd_pcm_hw_params *params, |
182 | struct snd_soc_dai *dai) | 182 | struct snd_soc_dai *dai) |
183 | { | 183 | { |
184 | struct device *dev = substream->pcm->card->dev; | 184 | struct device *dev = dai->dev; |
185 | struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 185 | struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
186 | u32 val; | 186 | u32 val; |
187 | int ret, sample_size, srate, i2sclock, bitcnt; | 187 | int ret, sample_size, srate, i2sclock, bitcnt; |