ASoC: ada*, ssm*: use simple i2c probe function
authorStephen Kitt <steve@sk2.org>
Fri, 25 Mar 2022 16:48:28 +0000 (17:48 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 5 Apr 2022 09:23:17 +0000 (10:23 +0100)
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: Stephen Kitt <steve@sk2.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220325164828.1209201-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/adau1372-i2c.c
sound/soc/codecs/adau1373.c
sound/soc/codecs/adau1701.c
sound/soc/codecs/adau7118-i2c.c
sound/soc/codecs/adav803.c
sound/soc/codecs/ssm2518.c
sound/soc/codecs/ssm4567.c

index fc87a76ff1eeb9add9cb54aa1f191f21bdf84e57..8ed0ffdedbc9d4d0486c492e50458afb6ada176d 100644 (file)
@@ -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);
index 46128aaceae9a843e120a6f54788917702e6729d..a9032b5c8d782fd8741c97e19a3e1ac7841bc755 100644 (file)
@@ -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,
 };
 
index dba9af7531880876709485a10dde08085df10de8..98768e5300f09b9c8036f956b3fef67ab0db88f1 100644 (file)
@@ -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,
 };
 
index aa7afb3b826dc9609dc54558be6cd861225ca576..afed48401b255474fdbc6722fb1acb7e3283ec69 100644 (file)
@@ -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);
index 0f565b851ea523e6b55d7147e56262f7a340590b..bf181bbaabedaff2d4532bf9ca794d015823c34d 100644 (file)
@@ -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);
index 09449c6c4024d8153816aabc8e12d5bfdeff17c4..83acbdbb8e0dabf11632229776b28a877a3b7618 100644 (file)
@@ -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);
index 811b1a2c404a2f0caf7256dec45a3961facacd3d..08ced09ef001d02529adf67ca6fd67be907240c9 100644 (file)
@@ -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);