diff options
Diffstat (limited to '')
-rw-r--r-- | sound/soc/codecs/tlv320aic32x4-i2c.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4-i2c.c b/sound/soc/codecs/tlv320aic32x4-i2c.c index 49b33a256c..b27b5ae1e4 100644 --- a/sound/soc/codecs/tlv320aic32x4-i2c.c +++ b/sound/soc/codecs/tlv320aic32x4-i2c.c @@ -16,33 +16,20 @@ #include "tlv320aic32x4.h" -static const struct of_device_id aic32x4_of_id[]; -static const struct i2c_device_id aic32x4_i2c_id[]; - static int aic32x4_i2c_probe(struct i2c_client *i2c) { struct regmap *regmap; struct regmap_config config; + enum aic32x4_type type; config = aic32x4_regmap_config; config.reg_bits = 8; config.val_bits = 8; regmap = devm_regmap_init_i2c(i2c, &config); + type = (uintptr_t)i2c_get_match_data(i2c); - if (i2c->dev.of_node) { - const struct of_device_id *oid; - - oid = of_match_node(aic32x4_of_id, i2c->dev.of_node); - dev_set_drvdata(&i2c->dev, (void *)oid->data); - } else { - const struct i2c_device_id *id; - - id = i2c_match_id(aic32x4_i2c_id, i2c); - dev_set_drvdata(&i2c->dev, (void *)id->driver_data); - } - - return aic32x4_probe(&i2c->dev, regmap); + return aic32x4_probe(&i2c->dev, regmap, type); } static void aic32x4_i2c_remove(struct i2c_client *i2c) |