diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/ak4613.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index 4d2e78101f28..034195c83bd7 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -653,15 +653,10 @@ static int ak4613_i2c_probe(struct i2c_client *i2c, struct ak4613_priv *priv; regmap_cfg = NULL; - if (np) { - const struct of_device_id *of_id; - - of_id = of_match_device(ak4613_of_match, dev); - if (of_id) - regmap_cfg = of_id->data; - } else { + if (np) + regmap_cfg = of_device_get_match_data(dev); + else regmap_cfg = (const struct regmap_config *)id->driver_data; - } if (!regmap_cfg) return -EINVAL; |