diff options
author | Claudius Heine <ch@denx.de> | 2021-06-17 11:52:28 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-23 13:49:34 +0300 |
commit | 688d47cdd9344b1485eb28c2a7aa99743ed529a3 (patch) | |
tree | 4cd24756aed57cb21c14343fb3cf51e82466dd2f /sound/soc/codecs/tlv320aic32x4.c | |
parent | 70585216fe7730d9fb5453d3e2804e149d0fe201 (diff) | |
download | linux-688d47cdd9344b1485eb28c2a7aa99743ed529a3.tar.xz |
ASoC: tlv320aic32x4: add type to device private data struct
While this driver can already handle different device variants, the
variant information cannot be used in the driver code and therefor
cannot have different code paths depending on the device variant.
This change adds a `type` value into the `aic32x4_priv` structure, that
contains a device variant identifier, which was set when the driver was
bound to the device.
Signed-off-by: Claudius Heine <ch@denx.de>
Link: https://lore.kernel.org/r/20210617085230.1851503-2-ch@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tlv320aic32x4.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic32x4.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index b689f26fc4be..70a1574fb72a 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -48,6 +48,7 @@ struct aic32x4_priv { struct aic32x4_setup_data *setup; struct device *dev; + enum aic32x4_type type; }; static int aic32x4_reset_adc(struct snd_soc_dapm_widget *w, @@ -1198,6 +1199,8 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) return -ENOMEM; aic32x4->dev = dev; + aic32x4->type = (enum aic32x4_type)dev_get_drvdata(dev); + dev_set_drvdata(dev, aic32x4); if (pdata) { |