aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel/mchp-spdiftx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/atmel/mchp-spdiftx.c')
-rw-r--r--sound/soc/atmel/mchp-spdiftx.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c
index d24380046435..ab2d7a791f39 100644
--- a/sound/soc/atmel/mchp-spdiftx.c
+++ b/sound/soc/atmel/mchp-spdiftx.c
@@ -196,8 +196,7 @@ struct mchp_spdiftx_dev {
struct clk *pclk;
struct clk *gclk;
unsigned int fmt;
- const struct mchp_i2s_caps *caps;
- int gclk_enabled:1;
+ unsigned int gclk_enabled:1;
};
static inline int mchp_spdiftx_is_running(struct mchp_spdiftx_dev *dev)
@@ -341,12 +340,10 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd,
ret = regmap_write(dev->regmap, SPDIFTX_MR, mr);
spin_unlock(&ctrl->lock);
- if (ret) {
+ if (ret)
dev_err(dev->dev, "unable to disable TX: %d\n", ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream,
@@ -753,7 +750,8 @@ static struct snd_soc_dai_driver mchp_spdiftx_dai = {
};
static const struct snd_soc_component_driver mchp_spdiftx_component = {
- .name = "mchp-spdiftx",
+ .name = "mchp-spdiftx",
+ .legacy_dai_naming = 1,
};
static const struct of_device_id mchp_spdiftx_dt_ids[] = {
@@ -762,12 +760,10 @@ static const struct of_device_id mchp_spdiftx_dt_ids[] = {
},
{ /* sentinel */ }
};
-
MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids);
+
static int mchp_spdiftx_probe(struct platform_device *pdev)
{
- struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *match;
struct mchp_spdiftx_dev *dev;
struct resource *mem;
struct regmap *regmap;
@@ -781,11 +777,6 @@ static int mchp_spdiftx_probe(struct platform_device *pdev)
if (!dev)
return -ENOMEM;
- /* Get hardware capabilities. */
- match = of_match_node(mchp_spdiftx_dt_ids, np);
- if (match)
- dev->caps = match->data;
-
/* Map I/O registers. */
base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem);
if (IS_ERR(base))
@@ -847,12 +838,10 @@ static int mchp_spdiftx_probe(struct platform_device *pdev)
err = devm_snd_soc_register_component(&pdev->dev,
&mchp_spdiftx_component,
&mchp_spdiftx_dai, 1);
- if (err) {
+ if (err)
dev_err(&pdev->dev, "failed to register component: %d\n", err);
- return err;
- }
- return 0;
+ return err;
}
static struct platform_driver mchp_spdiftx_driver = {