summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/ad193x-i2c.c
diff options
context:
space:
mode:
authorStephen Kitt <steve@sk2.org>2022-03-25 17:54:52 +0100
committerMark Brown <broonie@kernel.org>2022-04-05 10:23:09 +0100
commite5cd0623d7879eb98059223b9eb233a686d58b40 (patch)
treecdae77ade01549dcc90ca2b223cf12f39874814a /sound/soc/codecs/ad193x-i2c.c
parent900dedd7e47cc3f8d93dfa0ae6ac6cf49eda0c97 (diff)
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/ad193x-i2c.c')
-rw-r--r--sound/soc/codecs/ad193x-i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/ad193x-i2c.c b/sound/soc/codecs/ad193x-i2c.c
index 3d509a65e4ca..4cb8d87f9011 100644
--- a/sound/soc/codecs/ad193x-i2c.c
+++ b/sound/soc/codecs/ad193x-i2c.c
@@ -20,10 +20,10 @@ static const struct i2c_device_id ad193x_id[] = {
};
MODULE_DEVICE_TABLE(i2c, ad193x_id);
-static int ad193x_i2c_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ad193x_i2c_probe(struct i2c_client *client)
{
struct regmap_config config;
+ const struct i2c_device_id *id = i2c_match_id(ad193x_id, client);
config = ad193x_regmap_config;
config.val_bits = 8;
@@ -38,7 +38,7 @@ static struct i2c_driver ad193x_i2c_driver = {
.driver = {
.name = "ad193x",
},
- .probe = ad193x_i2c_probe,
+ .probe_new = ad193x_i2c_probe,
.id_table = ad193x_id,
};
module_i2c_driver(ad193x_i2c_driver);