diff options
author | Stephen Kitt <steve@sk2.org> | 2022-03-25 17:54:52 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-05 11:23:09 +0200 |
commit | e5cd0623d7879eb98059223b9eb233a686d58b40 (patch) | |
tree | cdae77ade01549dcc90ca2b223cf12f39874814a /sound/soc/codecs/adau1781-i2c.c | |
parent | ASoC: Introduce snd_soc_of_get_dai_link_cpus (diff) | |
download | linux-e5cd0623d7879eb98059223b9eb233a686d58b40.tar.xz linux-e5cd0623d7879eb98059223b9eb233a686d58b40.zip |
ASoC: ad1*, ada*, ssm*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220325165452.1212975-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/adau1781-i2c.c')
-rw-r--r-- | sound/soc/codecs/adau1781-i2c.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/codecs/adau1781-i2c.c b/sound/soc/codecs/adau1781-i2c.c index 1c476429ad99..e046de0ebcc7 100644 --- a/sound/soc/codecs/adau1781-i2c.c +++ b/sound/soc/codecs/adau1781-i2c.c @@ -14,10 +14,12 @@ #include "adau1781.h" -static int adau1781_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static const struct i2c_device_id adau1781_i2c_ids[]; + +static int adau1781_i2c_probe(struct i2c_client *client) { struct regmap_config config; + const struct i2c_device_id *id = i2c_match_id(adau1781_i2c_ids, client); config = adau1781_regmap_config; config.val_bits = 8; @@ -55,7 +57,7 @@ static struct i2c_driver adau1781_i2c_driver = { .name = "adau1781", .of_match_table = of_match_ptr(adau1781_i2c_dt_ids), }, - .probe = adau1781_i2c_probe, + .probe_new = adau1781_i2c_probe, .remove = adau1781_i2c_remove, .id_table = adau1781_i2c_ids, }; |