Commit b79bd63a authored by Stephen Kitt's avatar Stephen Kitt Committed by Mark Brown

ASoC: ada*, ssm*: 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>
Reviewed-by: default avatarNuno Sá <nuno.sa@analog.com>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220325164828.1209201-1-steve@sk2.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9f342904
......@@ -14,7 +14,7 @@
#include "adau1372.h"
static int adau1372_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
static int adau1372_i2c_probe(struct i2c_client *client)
{
return adau1372_probe(&client->dev,
devm_regmap_init_i2c(client, &adau1372_regmap_config), NULL);
......@@ -30,7 +30,7 @@ static struct i2c_driver adau1372_i2c_driver = {
.driver = {
.name = "adau1372",
},
.probe = adau1372_i2c_probe,
.probe_new = adau1372_i2c_probe,
.id_table = adau1372_i2c_ids,
};
module_i2c_driver(adau1372_i2c_driver);
......
......@@ -1473,8 +1473,7 @@ static const struct snd_soc_component_driver adau1373_component_driver = {
.non_legacy_dai_naming = 1,
};
static int adau1373_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int adau1373_i2c_probe(struct i2c_client *client)
{
struct adau1373 *adau1373;
int ret;
......@@ -1508,7 +1507,7 @@ static struct i2c_driver adau1373_i2c_driver = {
.driver = {
.name = "adau1373",
},
.probe = adau1373_i2c_probe,
.probe_new = adau1373_i2c_probe,
.id_table = adau1373_i2c_id,
};
......
......@@ -785,8 +785,7 @@ static const struct regmap_config adau1701_regmap = {
.reg_read = adau1701_reg_read,
};
static int adau1701_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int adau1701_i2c_probe(struct i2c_client *client)
{
struct adau1701 *adau1701;
struct device *dev = &client->dev;
......@@ -878,7 +877,7 @@ static struct i2c_driver adau1701_i2c_driver = {
.name = "adau1701",
.of_match_table = of_match_ptr(adau1701_dt_ids),
},
.probe = adau1701_i2c_probe,
.probe_new = adau1701_i2c_probe,
.id_table = adau1701_i2c_id,
};
......
......@@ -48,8 +48,7 @@ static const struct regmap_config adau7118_regmap_config = {
.volatile_reg = adau7118_volatile,
};
static int adau7118_probe_i2c(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int adau7118_probe_i2c(struct i2c_client *i2c)
{
struct regmap *map;
......@@ -79,7 +78,7 @@ static struct i2c_driver adau7118_driver = {
.name = "adau7118",
.of_match_table = adau7118_of_match,
},
.probe = adau7118_probe_i2c,
.probe_new = adau7118_probe_i2c,
.id_table = adau7118_id,
};
module_i2c_driver(adau7118_driver);
......
......@@ -19,8 +19,7 @@ static const struct i2c_device_id adav803_id[] = {
};
MODULE_DEVICE_TABLE(i2c, adav803_id);
static int adav803_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int adav803_probe(struct i2c_client *client)
{
return adav80x_bus_probe(&client->dev,
devm_regmap_init_i2c(client, &adav80x_regmap_config));
......@@ -30,7 +29,7 @@ static struct i2c_driver adav803_driver = {
.driver = {
.name = "adav803",
},
.probe = adav803_probe,
.probe_new = adav803_probe,
.id_table = adav803_id,
};
module_i2c_driver(adav803_driver);
......
......@@ -735,8 +735,7 @@ static const struct regmap_config ssm2518_regmap_config = {
.num_reg_defaults = ARRAY_SIZE(ssm2518_reg_defaults),
};
static int ssm2518_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int ssm2518_i2c_probe(struct i2c_client *i2c)
{
struct ssm2518_platform_data *pdata = i2c->dev.platform_data;
struct ssm2518 *ssm2518;
......@@ -815,7 +814,7 @@ static struct i2c_driver ssm2518_driver = {
.name = "ssm2518",
.of_match_table = of_match_ptr(ssm2518_dt_ids),
},
.probe = ssm2518_i2c_probe,
.probe_new = ssm2518_i2c_probe,
.id_table = ssm2518_i2c_ids,
};
module_i2c_driver(ssm2518_driver);
......
......@@ -444,8 +444,7 @@ static const struct regmap_config ssm4567_regmap_config = {
.num_reg_defaults = ARRAY_SIZE(ssm4567_reg_defaults),
};
static int ssm4567_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int ssm4567_i2c_probe(struct i2c_client *i2c)
{
struct ssm4567 *ssm4567;
int ret;
......@@ -502,7 +501,7 @@ static struct i2c_driver ssm4567_driver = {
.of_match_table = of_match_ptr(ssm4567_of_match),
.acpi_match_table = ACPI_PTR(ssm4567_acpi_match),
},
.probe = ssm4567_i2c_probe,
.probe_new = ssm4567_i2c_probe,
.id_table = ssm4567_i2c_ids,
};
module_i2c_driver(ssm4567_driver);
......
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