aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel/atmel-classd.c
diff options
context:
space:
mode:
authorKuninori Morimoto <[email protected]>2018-01-29 02:44:05 +0000
committerMark Brown <[email protected]>2018-02-12 11:45:16 +0000
commit6dea9df84aa2c2c1c645fac933adf1c4e0c20ac7 (patch)
tree5a4eaac7e23193c794f85053e0092e00cd5aac77 /sound/soc/atmel/atmel-classd.c
parentASoC: sh: siu: replace platform to component (diff)
downloadkernel-6dea9df84aa2c2c1c645fac933adf1c4e0c20ac7.tar.gz
kernel-6dea9df84aa2c2c1c645fac933adf1c4e0c20ac7.zip
ASoC: atmel: replace platform to component
Now platform can be replaced to component, let's do it. To avoid complex operation, this patch adds device pointer to atmel_classd. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/atmel/atmel-classd.c')
-rw-r--r--sound/soc/atmel/atmel-classd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index ebabed69f0e6..6bc2b729495c 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -32,6 +32,7 @@ struct atmel_classd {
struct regmap *regmap;
struct clk *pclk;
struct clk *gclk;
+ struct device *dev;
int irq;
const struct atmel_classd_pdata *pdata;
};
@@ -165,7 +166,7 @@ atmel_classd_platform_configure_dma(struct snd_pcm_substream *substream,
struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card);
if (params_physical_width(params) != 16) {
- dev_err(rtd->platform->dev,
+ dev_err(dd->dev,
"only supports 16-bit audio data\n");
return -EINVAL;
}
@@ -587,6 +588,7 @@ static int atmel_classd_probe(struct platform_device *pdev)
}
dd->phy_base = res->start;
+ dd->dev = dev;
dd->regmap = devm_regmap_init_mmio(dev, io_base,
&atmel_classd_regmap_config);