未验证 提交 b79bd63a 编写于 作者: S Stephen Kitt 提交者: 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: NStephen Kitt <steve@sk2.org>
Reviewed-by: NNuno Sá <nuno.sa@analog.com>
Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220325164828.1209201-1-steve@sk2.orgSigned-off-by: NMark Brown <broonie@kernel.org>
上级 9f342904
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "adau1372.h" #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, return adau1372_probe(&client->dev,
devm_regmap_init_i2c(client, &adau1372_regmap_config), NULL); devm_regmap_init_i2c(client, &adau1372_regmap_config), NULL);
...@@ -30,7 +30,7 @@ static struct i2c_driver adau1372_i2c_driver = { ...@@ -30,7 +30,7 @@ static struct i2c_driver adau1372_i2c_driver = {
.driver = { .driver = {
.name = "adau1372", .name = "adau1372",
}, },
.probe = adau1372_i2c_probe, .probe_new = adau1372_i2c_probe,
.id_table = adau1372_i2c_ids, .id_table = adau1372_i2c_ids,
}; };
module_i2c_driver(adau1372_i2c_driver); module_i2c_driver(adau1372_i2c_driver);
......
...@@ -1473,8 +1473,7 @@ static const struct snd_soc_component_driver adau1373_component_driver = { ...@@ -1473,8 +1473,7 @@ static const struct snd_soc_component_driver adau1373_component_driver = {
.non_legacy_dai_naming = 1, .non_legacy_dai_naming = 1,
}; };
static int adau1373_i2c_probe(struct i2c_client *client, static int adau1373_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct adau1373 *adau1373; struct adau1373 *adau1373;
int ret; int ret;
...@@ -1508,7 +1507,7 @@ static struct i2c_driver adau1373_i2c_driver = { ...@@ -1508,7 +1507,7 @@ static struct i2c_driver adau1373_i2c_driver = {
.driver = { .driver = {
.name = "adau1373", .name = "adau1373",
}, },
.probe = adau1373_i2c_probe, .probe_new = adau1373_i2c_probe,
.id_table = adau1373_i2c_id, .id_table = adau1373_i2c_id,
}; };
......
...@@ -785,8 +785,7 @@ static const struct regmap_config adau1701_regmap = { ...@@ -785,8 +785,7 @@ static const struct regmap_config adau1701_regmap = {
.reg_read = adau1701_reg_read, .reg_read = adau1701_reg_read,
}; };
static int adau1701_i2c_probe(struct i2c_client *client, static int adau1701_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct adau1701 *adau1701; struct adau1701 *adau1701;
struct device *dev = &client->dev; struct device *dev = &client->dev;
...@@ -878,7 +877,7 @@ static struct i2c_driver adau1701_i2c_driver = { ...@@ -878,7 +877,7 @@ static struct i2c_driver adau1701_i2c_driver = {
.name = "adau1701", .name = "adau1701",
.of_match_table = of_match_ptr(adau1701_dt_ids), .of_match_table = of_match_ptr(adau1701_dt_ids),
}, },
.probe = adau1701_i2c_probe, .probe_new = adau1701_i2c_probe,
.id_table = adau1701_i2c_id, .id_table = adau1701_i2c_id,
}; };
......
...@@ -48,8 +48,7 @@ static const struct regmap_config adau7118_regmap_config = { ...@@ -48,8 +48,7 @@ static const struct regmap_config adau7118_regmap_config = {
.volatile_reg = adau7118_volatile, .volatile_reg = adau7118_volatile,
}; };
static int adau7118_probe_i2c(struct i2c_client *i2c, static int adau7118_probe_i2c(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct regmap *map; struct regmap *map;
...@@ -79,7 +78,7 @@ static struct i2c_driver adau7118_driver = { ...@@ -79,7 +78,7 @@ static struct i2c_driver adau7118_driver = {
.name = "adau7118", .name = "adau7118",
.of_match_table = adau7118_of_match, .of_match_table = adau7118_of_match,
}, },
.probe = adau7118_probe_i2c, .probe_new = adau7118_probe_i2c,
.id_table = adau7118_id, .id_table = adau7118_id,
}; };
module_i2c_driver(adau7118_driver); module_i2c_driver(adau7118_driver);
......
...@@ -19,8 +19,7 @@ static const struct i2c_device_id adav803_id[] = { ...@@ -19,8 +19,7 @@ static const struct i2c_device_id adav803_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, adav803_id); MODULE_DEVICE_TABLE(i2c, adav803_id);
static int adav803_probe(struct i2c_client *client, static int adav803_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
return adav80x_bus_probe(&client->dev, return adav80x_bus_probe(&client->dev,
devm_regmap_init_i2c(client, &adav80x_regmap_config)); devm_regmap_init_i2c(client, &adav80x_regmap_config));
...@@ -30,7 +29,7 @@ static struct i2c_driver adav803_driver = { ...@@ -30,7 +29,7 @@ static struct i2c_driver adav803_driver = {
.driver = { .driver = {
.name = "adav803", .name = "adav803",
}, },
.probe = adav803_probe, .probe_new = adav803_probe,
.id_table = adav803_id, .id_table = adav803_id,
}; };
module_i2c_driver(adav803_driver); module_i2c_driver(adav803_driver);
......
...@@ -735,8 +735,7 @@ static const struct regmap_config ssm2518_regmap_config = { ...@@ -735,8 +735,7 @@ static const struct regmap_config ssm2518_regmap_config = {
.num_reg_defaults = ARRAY_SIZE(ssm2518_reg_defaults), .num_reg_defaults = ARRAY_SIZE(ssm2518_reg_defaults),
}; };
static int ssm2518_i2c_probe(struct i2c_client *i2c, static int ssm2518_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct ssm2518_platform_data *pdata = i2c->dev.platform_data; struct ssm2518_platform_data *pdata = i2c->dev.platform_data;
struct ssm2518 *ssm2518; struct ssm2518 *ssm2518;
...@@ -815,7 +814,7 @@ static struct i2c_driver ssm2518_driver = { ...@@ -815,7 +814,7 @@ static struct i2c_driver ssm2518_driver = {
.name = "ssm2518", .name = "ssm2518",
.of_match_table = of_match_ptr(ssm2518_dt_ids), .of_match_table = of_match_ptr(ssm2518_dt_ids),
}, },
.probe = ssm2518_i2c_probe, .probe_new = ssm2518_i2c_probe,
.id_table = ssm2518_i2c_ids, .id_table = ssm2518_i2c_ids,
}; };
module_i2c_driver(ssm2518_driver); module_i2c_driver(ssm2518_driver);
......
...@@ -444,8 +444,7 @@ static const struct regmap_config ssm4567_regmap_config = { ...@@ -444,8 +444,7 @@ static const struct regmap_config ssm4567_regmap_config = {
.num_reg_defaults = ARRAY_SIZE(ssm4567_reg_defaults), .num_reg_defaults = ARRAY_SIZE(ssm4567_reg_defaults),
}; };
static int ssm4567_i2c_probe(struct i2c_client *i2c, static int ssm4567_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct ssm4567 *ssm4567; struct ssm4567 *ssm4567;
int ret; int ret;
...@@ -502,7 +501,7 @@ static struct i2c_driver ssm4567_driver = { ...@@ -502,7 +501,7 @@ static struct i2c_driver ssm4567_driver = {
.of_match_table = of_match_ptr(ssm4567_of_match), .of_match_table = of_match_ptr(ssm4567_of_match),
.acpi_match_table = ACPI_PTR(ssm4567_acpi_match), .acpi_match_table = ACPI_PTR(ssm4567_acpi_match),
}, },
.probe = ssm4567_i2c_probe, .probe_new = ssm4567_i2c_probe,
.id_table = ssm4567_i2c_ids, .id_table = ssm4567_i2c_ids,
}; };
module_i2c_driver(ssm4567_driver); module_i2c_driver(ssm4567_driver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册