Skip to content

Commit

Permalink
ASoC: codecs: max98090: simplify snd_soc_dai_driver
Browse files Browse the repository at this point in the history
The max98090 has only one DAI, so snd_soc_dai_driver does not have to be
an array.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
krzk authored and broonie committed Feb 9, 2023
1 parent 0551ff7 commit 35ff105
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sound/soc/codecs/max98090.c
Original file line number Diff line number Diff line change
Expand Up @@ -2356,8 +2356,7 @@ static const struct snd_soc_dai_ops max98090_dai_ops = {
.no_capture_mute = 1,
};

static struct snd_soc_dai_driver max98090_dai[] = {
{
static struct snd_soc_dai_driver max98090_dai = {
.name = "HiFi",
.playback = {
.stream_name = "HiFi Playback",
Expand All @@ -2374,7 +2373,6 @@ static struct snd_soc_dai_driver max98090_dai[] = {
.formats = MAX98090_FORMATS,
},
.ops = &max98090_dai_ops,
}
};

static int max98090_probe(struct snd_soc_component *component)
Expand Down Expand Up @@ -2594,8 +2592,8 @@ static int max98090_i2c_probe(struct i2c_client *i2c)
}

ret = devm_snd_soc_register_component(&i2c->dev,
&soc_component_dev_max98090, max98090_dai,
ARRAY_SIZE(max98090_dai));
&soc_component_dev_max98090,
&max98090_dai, 1);
err_enable:
return ret;
}
Expand Down

0 comments on commit 35ff105

Please sign in to comment.