Commit 9ba0daa6 authored by Stephen Kitt's avatar Stephen Kitt Committed by Mark Brown

ASoC: tlv320*: use simple i2c probe function

The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.
Signed-off-by: default avatarStephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220405165836.2165310-13-steve@sk2.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 33108917
...@@ -1083,8 +1083,7 @@ static const struct of_device_id tlv320adcx140_of_match[] = { ...@@ -1083,8 +1083,7 @@ static const struct of_device_id tlv320adcx140_of_match[] = {
MODULE_DEVICE_TABLE(of, tlv320adcx140_of_match); MODULE_DEVICE_TABLE(of, tlv320adcx140_of_match);
#endif #endif
static int adcx140_i2c_probe(struct i2c_client *i2c, static int adcx140_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct adcx140_priv *adcx140; struct adcx140_priv *adcx140;
int ret; int ret;
...@@ -1143,7 +1142,7 @@ static struct i2c_driver adcx140_i2c_driver = { ...@@ -1143,7 +1142,7 @@ static struct i2c_driver adcx140_i2c_driver = {
.name = "tlv320adcx140-codec", .name = "tlv320adcx140-codec",
.of_match_table = of_match_ptr(tlv320adcx140_of_match), .of_match_table = of_match_ptr(tlv320adcx140_of_match),
}, },
.probe = adcx140_i2c_probe, .probe_new = adcx140_i2c_probe,
.id_table = adcx140_i2c_id, .id_table = adcx140_i2c_id,
}; };
module_i2c_driver(adcx140_i2c_driver); module_i2c_driver(adcx140_i2c_driver);
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
#include "tlv320aic23.h" #include "tlv320aic23.h"
static int tlv320aic23_i2c_probe(struct i2c_client *i2c, static int tlv320aic23_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *i2c_id)
{ {
struct regmap *regmap; struct regmap *regmap;
...@@ -48,7 +47,7 @@ static struct i2c_driver tlv320aic23_i2c_driver = { ...@@ -48,7 +47,7 @@ static struct i2c_driver tlv320aic23_i2c_driver = {
.name = "tlv320aic23-codec", .name = "tlv320aic23-codec",
.of_match_table = of_match_ptr(tlv320aic23_of_match), .of_match_table = of_match_ptr(tlv320aic23_of_match),
}, },
.probe = tlv320aic23_i2c_probe, .probe_new = tlv320aic23_i2c_probe,
.id_table = tlv320aic23_id, .id_table = tlv320aic23_id,
}; };
......
...@@ -1463,8 +1463,7 @@ static struct snd_soc_dai_driver dac33_dai = { ...@@ -1463,8 +1463,7 @@ static struct snd_soc_dai_driver dac33_dai = {
.ops = &dac33_dai_ops, .ops = &dac33_dai_ops,
}; };
static int dac33_i2c_probe(struct i2c_client *client, static int dac33_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct tlv320dac33_platform_data *pdata; struct tlv320dac33_platform_data *pdata;
struct tlv320dac33_priv *dac33; struct tlv320dac33_priv *dac33;
...@@ -1566,7 +1565,7 @@ static struct i2c_driver tlv320dac33_i2c_driver = { ...@@ -1566,7 +1565,7 @@ static struct i2c_driver tlv320dac33_i2c_driver = {
.driver = { .driver = {
.name = "tlv320dac33-codec", .name = "tlv320dac33-codec",
}, },
.probe = dac33_i2c_probe, .probe_new = dac33_i2c_probe,
.remove = dac33_i2c_remove, .remove = dac33_i2c_remove,
.id_table = tlv320dac33_i2c_id, .id_table = tlv320dac33_i2c_id,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment