Skip to content

Commit

Permalink
ASoC: use a valid device for dev_err() in Zylonite
Browse files Browse the repository at this point in the history
A recent conversion has introduced references to &pdev->dev, which does
not actually exist in all the contexts it's used in.

Replace this with card->dev where necessary, in order to let
the driver build again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
  • Loading branch information
Arnd Bergmann authored and Mark Brown committed Oct 2, 2011
1 parent 9058020 commit eff919a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/pxa/zylonite.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,20 @@ static int zylonite_probe(struct snd_soc_card *card)
if (clk_pout) {
pout = clk_get(NULL, "CLK_POUT");
if (IS_ERR(pout)) {
dev_err(&pdev->dev, "Unable to obtain CLK_POUT: %ld\n",
dev_err(card->dev, "Unable to obtain CLK_POUT: %ld\n",
PTR_ERR(pout));
return PTR_ERR(pout);
}

ret = clk_enable(pout);
if (ret != 0) {
dev_err(&pdev->dev, "Unable to enable CLK_POUT: %d\n",
dev_err(card->dev, "Unable to enable CLK_POUT: %d\n",
ret);
clk_put(pout);
return ret;
}

dev_dbg(&pdev->dev, "MCLK enabled at %luHz\n",
dev_dbg(card->dev, "MCLK enabled at %luHz\n",
clk_get_rate(pout));
}

Expand Down Expand Up @@ -241,7 +241,7 @@ static int zylonite_resume_pre(struct snd_soc_card *card)
if (clk_pout) {
ret = clk_enable(pout);
if (ret != 0)
dev_err(&pdev->dev, "Unable to enable CLK_POUT: %d\n",
dev_err(card->dev, "Unable to enable CLK_POUT: %d\n",
ret);
}

Expand Down

0 comments on commit eff919a

Please sign in to comment.