ASoC: cs*: use simple i2c probe function
Subsystems (3)
PATCH 1/1 ASoC: cs*: 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.
--- sound/soc/codecs/cs35l32.c | 5 ++--- sound/soc/codecs/cs35l33.c | 5 ++--- sound/soc/codecs/cs35l34.c | 5 ++--- sound/soc/codecs/cs35l35.c | 5 ++--- sound/soc/codecs/cs35l36.c | 5 ++--- sound/soc/codecs/cs35l41-i2c.c | 5 ++--- sound/soc/codecs/cs4234.c | 4 ++-- sound/soc/codecs/cs4265.c | 5 ++--- sound/soc/codecs/cs4270.c | 5 ++--- sound/soc/codecs/cs4271-i2c.c | 5 ++--- sound/soc/codecs/cs42l42.c | 5 ++--- sound/soc/codecs/cs42l51-i2c.c | 5 ++--- sound/soc/codecs/cs42l52.c | 5 ++--- sound/soc/codecs/cs42l56.c | 5 ++--- sound/soc/codecs/cs42l73.c | 5 ++--- sound/soc/codecs/cs42xx8-i2c.c | 5 ++--- sound/soc/codecs/cs43130.c | 5 ++--- sound/soc/codecs/cs4341.c | 5 ++--- sound/soc/codecs/cs4349.c | 5 ++--- sound/soc/codecs/cs53l30.c | 5 ++--- 20 files changed, 40 insertions(+), 59 deletions(-)
sound/soc/codecs/cs35l32.c +2 -3
@@ -346,8 +346,7 @@ static int cs35l32_handle_of_data(struct i2c_client *i2c_client,return 0 ; } -static int cs35l32_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l32_i2c_probe (struct i2c_client *i2c_client) {struct cs35l32_private *cs35l32; struct cs35l32_platform_data *pdata =
@@ -576,7 +575,7 @@ static struct i2c_driver cs35l32_i2c_driver = { .of_match_table = cs35l32_of_match, }, .id_table = cs35l32_id, - .probe = cs35l32_i2c_probe, + .probe_new = cs35l32_i2c_probe, .remove = cs35l32_i2c_remove, };
sound/soc/codecs/cs35l33.c +2 -3
@@ -1116,8 +1116,7 @@ static int cs35l33_of_get_pdata(struct device *dev,return 0 ; } -static int cs35l33_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l33_i2c_probe (struct i2c_client *i2c_client) {struct cs35l33_private *cs35l33;struct cs35l33_pdata *pdata =dev_get_platdata (&i2c_client->dev);
@@ -1286,7 +1285,7 @@ static struct i2c_driver cs35l33_i2c_driver = { }, .id_table = cs35l33_id, - .probe = cs35l33_i2c_probe, + .probe_new = cs35l33_i2c_probe, .remove = cs35l33_i2c_remove, };
sound/soc/codecs/cs35l34.c +2 -3
@@ -994,8 +994,7 @@ static const char * const cs35l34_core_supplies[] = { "VP", }; -static int cs35l34_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l34_i2c_probe (struct i2c_client *i2c_client) {struct cs35l34_private *cs35l34; struct cs35l34_platform_data *pdata =
@@ -1217,7 +1216,7 @@ static struct i2c_driver cs35l34_i2c_driver = { }, .id_table = cs35l34_id, - .probe = cs35l34_i2c_probe, + .probe_new = cs35l34_i2c_probe, .remove = cs35l34_i2c_remove, };
sound/soc/codecs/cs35l35.c +2 -3
@@ -1466,8 +1466,7 @@ static const struct reg_sequence cs35l35_errata_patch[] = { { 0x7F, 0x00 }, }; -static int cs35l35_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l35_i2c_probe (struct i2c_client *i2c_client) {struct cs35l35_private *cs35l35;struct device *dev = &i2c_client->dev;
@@ -1658,7 +1657,7 @@ static struct i2c_driver cs35l35_i2c_driver = { .of_match_table = cs35l35_of_match, }, .id_table = cs35l35_id, - .probe = cs35l35_i2c_probe, + .probe_new = cs35l35_i2c_probe, .remove = cs35l35_i2c_remove, };
sound/soc/codecs/cs35l36.c +2 -3
@@ -1700,8 +1700,7 @@ static const struct reg_sequence cs35l36_revb0_errata_patch[] = { { CS35L36_TESTKEY_CTRL, CS35L36_TEST_LOCK2 }, }; -static int cs35l36_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l36_i2c_probe (struct i2c_client *i2c_client) {struct cs35l36_private *cs35l36;struct device *dev = &i2c_client->dev;
@@ -1947,7 +1946,7 @@ static struct i2c_driver cs35l36_i2c_driver = { .of_match_table = cs35l36_of_match, }, .id_table = cs35l36_id, - .probe = cs35l36_i2c_probe, + .probe_new = cs35l36_i2c_probe, .remove = cs35l36_i2c_remove, };module_i2c_driver (cs35l36_i2c_driver);
sound/soc/codecs/cs35l41-i2c.c +2 -3
@@ -29,8 +29,7 @@ static const struct i2c_device_id cs35l41_id_i2c[] = {MODULE_DEVICE_TABLE (i2c, cs35l41_id_i2c); -static int cs35l41_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs35l41_i2c_probe (struct i2c_client *client) {struct cs35l41_private *cs35l41;struct device *dev = &client->dev;
@@ -91,7 +90,7 @@ static struct i2c_driver cs35l41_i2c_driver = { .acpi_match_table = ACPI_PTR(cs35l41_acpi_match), }, .id_table = cs35l41_id_i2c, - .probe = cs35l41_i2c_probe, + .probe_new = cs35l41_i2c_probe, .remove = cs35l41_i2c_remove, };
sound/soc/codecs/cs4234.c +2 -2
@@ -731,7 +731,7 @@ static int cs4234_powerup(struct cs4234 *cs4234)return 0 ; } -static int cs4234_i2c_probe (struct i2c_client *i2c_client,const struct i2c_device_id *id) +static int cs4234_i2c_probe (struct i2c_client *i2c_client) {struct cs4234 *cs4234;struct device *dev = &i2c_client->dev;
@@ -908,7 +908,7 @@ static struct i2c_driver cs4234_i2c_driver = { .pm = &cs4234_pm, .of_match_table = cs4234_of_match, }, - .probe = cs4234_i2c_probe, + .probe_new = cs4234_i2c_probe, .remove = cs4234_i2c_remove, };module_i2c_driver (cs4234_i2c_driver);
sound/soc/codecs/cs4265.c +2 -3
@@ -568,8 +568,7 @@ static const struct regmap_config cs4265_regmap = { .cache_type = REGCACHE_RBTREE, }; -static int cs4265_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs4265_i2c_probe (struct i2c_client *i2c_client) {struct cs4265_private *cs4265;int ret;
@@ -653,7 +652,7 @@ static struct i2c_driver cs4265_i2c_driver = { .of_match_table = cs4265_of_match, }, .id_table = cs4265_id, - .probe = cs4265_i2c_probe, + .probe_new = cs4265_i2c_probe, .remove = cs4265_i2c_remove, };
sound/soc/codecs/cs4270.c +2 -3
@@ -677,8 +677,7 @@ static int cs4270_i2c_remove(struct i2c_client *i2c_client)* This function is called whenever the I2C subsystem finds a device that * matches the device ID given via a prior call to i2c_add_driver(). */ -static int cs4270_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs4270_i2c_probe (struct i2c_client *i2c_client) {struct cs4270_private *cs4270;unsigned int val;
@@ -765,7 +764,7 @@ static struct i2c_driver cs4270_i2c_driver = { .of_match_table = cs4270_of_match, }, .id_table = cs4270_id, - .probe = cs4270_i2c_probe, + .probe_new = cs4270_i2c_probe, .remove = cs4270_i2c_remove, };
sound/soc/codecs/cs4271-i2c.c +2 -3
@@ -11,8 +11,7 @@#include <sound/soc.h> #include "cs4271.h" -static int cs4271_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs4271_i2c_probe (struct i2c_client *client) {struct regmap_config config;
@@ -35,7 +34,7 @@ static struct i2c_driver cs4271_i2c_driver = { .name = "cs4271", .of_match_table = of_match_ptr(cs4271_dt_ids), }, - .probe = cs4271_i2c_probe, + .probe_new = cs4271_i2c_probe, .id_table = cs4271_i2c_id, };module_i2c_driver (cs4271_i2c_driver);
sound/soc/codecs/cs42l42.c +2 -3
@@ -2040,8 +2040,7 @@ static int cs42l42_handle_device_data(struct device *dev,return 0 ; } -static int cs42l42_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l42_i2c_probe (struct i2c_client *i2c_client) {struct cs42l42_private *cs42l42;int ret, i, devid;
@@ -2240,7 +2239,7 @@ static struct i2c_driver cs42l42_i2c_driver = { .acpi_match_table = ACPI_PTR(cs42l42_acpi_match), }, .id_table = cs42l42_id, - .probe = cs42l42_i2c_probe, + .probe_new = cs42l42_i2c_probe, .remove = cs42l42_i2c_remove, };
sound/soc/codecs/cs42l51-i2c.c +2 -3
@@ -19,8 +19,7 @@ static struct i2c_device_id cs42l51_i2c_id[] = { };MODULE_DEVICE_TABLE (i2c, cs42l51_i2c_id); -static int cs42l51_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *id) +static int cs42l51_i2c_probe (struct i2c_client *i2c) {struct regmap_config config;
@@ -44,7 +43,7 @@ static struct i2c_driver cs42l51_i2c_driver = { .of_match_table = cs42l51_of_match, .pm = &cs42l51_pm_ops, }, - .probe = cs42l51_i2c_probe, + .probe_new = cs42l51_i2c_probe, .remove = cs42l51_i2c_remove, .id_table = cs42l51_i2c_id, };
sound/soc/codecs/cs42l52.c +2 -3
@@ -1086,8 +1086,7 @@ static const struct regmap_config cs42l52_regmap = { .cache_type = REGCACHE_RBTREE, }; -static int cs42l52_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l52_i2c_probe (struct i2c_client *i2c_client) {struct cs42l52_private *cs42l52;struct cs42l52_platform_data *pdata =dev_get_platdata (&i2c_client->dev);
@@ -1226,7 +1225,7 @@ static struct i2c_driver cs42l52_i2c_driver = { .of_match_table = cs42l52_of_match, }, .id_table = cs42l52_id, - .probe = cs42l52_i2c_probe, + .probe_new = cs42l52_i2c_probe, };module_i2c_driver (cs42l52_i2c_driver);
sound/soc/codecs/cs42l56.c +2 -3
@@ -1167,8 +1167,7 @@ static int cs42l56_handle_of_data(struct i2c_client *i2c_client,return 0 ; } -static int cs42l56_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l56_i2c_probe (struct i2c_client *i2c_client) {struct cs42l56_private *cs42l56; struct cs42l56_platform_data *pdata =
@@ -1350,7 +1349,7 @@ static struct i2c_driver cs42l56_i2c_driver = { .of_match_table = cs42l56_of_match, }, .id_table = cs42l56_id, - .probe = cs42l56_i2c_probe, + .probe_new = cs42l56_i2c_probe, .remove = cs42l56_i2c_remove, };
sound/soc/codecs/cs42l73.c +2 -3
@@ -1274,8 +1274,7 @@ static const struct regmap_config cs42l73_regmap = { .use_single_write = true, }; -static int cs42l73_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l73_i2c_probe (struct i2c_client *i2c_client) {struct cs42l73_private *cs42l73;struct cs42l73_platform_data *pdata =dev_get_platdata (&i2c_client->dev);
@@ -1386,7 +1385,7 @@ static struct i2c_driver cs42l73_i2c_driver = { .of_match_table = cs42l73_of_match, }, .id_table = cs42l73_id, - .probe = cs42l73_i2c_probe, + .probe_new = cs42l73_i2c_probe, };
sound/soc/codecs/cs42xx8-i2c.c +2 -3
@@ -17,8 +17,7 @@#include "cs42xx8.h" -static int cs42xx8_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *id) +static int cs42xx8_i2c_probe (struct i2c_client *i2c) {int ret =cs42xx8_probe (&i2c->dev,devm_regmap_init_i2c (i2c, &cs42xx8_regmap_config));
@@ -51,7 +50,7 @@ static struct i2c_driver cs42xx8_i2c_driver = { .pm = &cs42xx8_pm, .of_match_table = cs42xx8_of_match, }, - .probe = cs42xx8_i2c_probe, + .probe_new = cs42xx8_i2c_probe, .remove = cs42xx8_i2c_remove, .id_table = cs42xx8_i2c_id, };
sound/soc/codecs/cs43130.c +2 -3
@@ -2418,8 +2418,7 @@ static int cs43130_handle_device_data(struct i2c_client *i2c_client,return 0 ; } -static int cs43130_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs43130_i2c_probe (struct i2c_client *client) {struct cs43130_private *cs43130;int ret;
@@ -2702,7 +2701,7 @@ static struct i2c_driver cs43130_i2c_driver = { .pm = &cs43130_runtime_pm, }, .id_table = cs43130_i2c_id, - .probe = cs43130_i2c_probe, + .probe_new = cs43130_i2c_probe, .remove = cs43130_i2c_remove, };
sound/soc/codecs/cs4341.c +2 -3
@@ -225,8 +225,7 @@ static int cs4341_probe(struct device *dev) }#if IS_ENABLED (CONFIG_I2C ) -static int cs4341_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *id) +static int cs4341_i2c_probe (struct i2c_client *i2c) {struct cs4341_priv *cs4341;
@@ -260,7 +259,7 @@ static struct i2c_driver cs4341_i2c_driver = { .name = "cs4341-i2c", .of_match_table = of_match_ptr(cs4341_dt_ids), }, - .probe = cs4341_i2c_probe, + .probe_new = cs4341_i2c_probe, .id_table = cs4341_i2c_id, };#endif
sound/soc/codecs/cs4349.c +2 -3
@@ -278,8 +278,7 @@ static const struct regmap_config cs4349_regmap = { .cache_type = REGCACHE_RBTREE, }; -static int cs4349_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs4349_i2c_probe (struct i2c_client *client) {struct cs4349_private *cs4349;int ret;
@@ -382,7 +381,7 @@ static struct i2c_driver cs4349_i2c_driver = { .pm = &cs4349_runtime_pm, }, .id_table = cs4349_i2c_id, - .probe = cs4349_i2c_probe, + .probe_new = cs4349_i2c_probe, .remove = cs4349_i2c_remove, };
sound/soc/codecs/cs53l30.c +2 -3
@@ -918,8 +918,7 @@ static struct regmap_config cs53l30_regmap = { .use_single_write = true, }; -static int cs53l30_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs53l30_i2c_probe (struct i2c_client *client) {const struct device_node *np = client->dev.of_node;struct device *dev = &client->dev;
@@ -1125,7 +1124,7 @@ static struct i2c_driver cs53l30_i2c_driver = { .pm = &cs53l30_runtime_pm, }, .id_table = cs53l30_id, - .probe = cs53l30_i2c_probe, + .probe_new = cs53l30_i2c_probe, .remove = cs53l30_i2c_remove, };
Signature · 1 line
2.27.0
Quoted 7 lines · Stephen Kitt
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 <[email protected]>
Quoted 482 lines
--- sound/soc/codecs/cs35l32.c | 5 ++--- sound/soc/codecs/cs35l33.c | 5 ++--- sound/soc/codecs/cs35l34.c | 5 ++--- sound/soc/codecs/cs35l35.c | 5 ++--- sound/soc/codecs/cs35l36.c | 5 ++--- sound/soc/codecs/cs35l41-i2c.c | 5 ++--- sound/soc/codecs/cs4234.c | 4 ++-- sound/soc/codecs/cs4265.c | 5 ++--- sound/soc/codecs/cs4270.c | 5 ++--- sound/soc/codecs/cs4271-i2c.c | 5 ++--- sound/soc/codecs/cs42l42.c | 5 ++--- sound/soc/codecs/cs42l51-i2c.c | 5 ++--- sound/soc/codecs/cs42l52.c | 5 ++--- sound/soc/codecs/cs42l56.c | 5 ++--- sound/soc/codecs/cs42l73.c | 5 ++--- sound/soc/codecs/cs42xx8-i2c.c | 5 ++--- sound/soc/codecs/cs43130.c | 5 ++--- sound/soc/codecs/cs4341.c | 5 ++--- sound/soc/codecs/cs4349.c | 5 ++--- sound/soc/codecs/cs53l30.c | 5 ++--- 20 files changed, 40 insertions(+), 59 deletions(-)sound/soc/codecs/cs35l32.c +2
-3@@ -346,8 +346,7 @@ static int cs35l32_handle_of_data(struct i2c_client *i2c_client,return 0 ; } -static int cs35l32_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l32_i2c_probe (struct i2c_client *i2c_client) {struct cs35l32_private *cs35l32; struct cs35l32_platform_data *pdata =@@ -576,7 +575,7 @@ static struct i2c_driver cs35l32_i2c_driver = { .of_match_table = cs35l32_of_match, }, .id_table = cs35l32_id, - .probe = cs35l32_i2c_probe, + .probe_new = cs35l32_i2c_probe, .remove = cs35l32_i2c_remove, };sound/soc/codecs/cs35l33.c +2
-3@@ -1116,8 +1116,7 @@ static int cs35l33_of_get_pdata(struct device *dev,return 0 ; } -static int cs35l33_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l33_i2c_probe (struct i2c_client *i2c_client) {struct cs35l33_private *cs35l33;struct cs35l33_pdata *pdata =dev_get_platdata (&i2c_client->dev);@@ -1286,7 +1285,7 @@ static struct i2c_driver cs35l33_i2c_driver = { }, .id_table = cs35l33_id, - .probe = cs35l33_i2c_probe, + .probe_new = cs35l33_i2c_probe, .remove = cs35l33_i2c_remove, };sound/soc/codecs/cs35l34.c +2
-3@@ -994,8 +994,7 @@ static const char * const cs35l34_core_supplies[] = { "VP", }; -static int cs35l34_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l34_i2c_probe (struct i2c_client *i2c_client) {struct cs35l34_private *cs35l34; struct cs35l34_platform_data *pdata =@@ -1217,7 +1216,7 @@ static struct i2c_driver cs35l34_i2c_driver = { }, .id_table = cs35l34_id, - .probe = cs35l34_i2c_probe, + .probe_new = cs35l34_i2c_probe, .remove = cs35l34_i2c_remove, };sound/soc/codecs/cs35l35.c +2
-3@@ -1466,8 +1466,7 @@ static const struct reg_sequence cs35l35_errata_patch[] = { { 0x7F, 0x00 }, }; -static int cs35l35_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l35_i2c_probe (struct i2c_client *i2c_client) {struct cs35l35_private *cs35l35;struct device *dev = &i2c_client->dev;@@ -1658,7 +1657,7 @@ static struct i2c_driver cs35l35_i2c_driver = { .of_match_table = cs35l35_of_match, }, .id_table = cs35l35_id, - .probe = cs35l35_i2c_probe, + .probe_new = cs35l35_i2c_probe, .remove = cs35l35_i2c_remove, };sound/soc/codecs/cs35l36.c +2
-3@@ -1700,8 +1700,7 @@ static const struct reg_sequence cs35l36_revb0_errata_patch[] = { { CS35L36_TESTKEY_CTRL, CS35L36_TEST_LOCK2 }, }; -static int cs35l36_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs35l36_i2c_probe (struct i2c_client *i2c_client) {struct cs35l36_private *cs35l36;struct device *dev = &i2c_client->dev;@@ -1947,7 +1946,7 @@ static struct i2c_driver cs35l36_i2c_driver = { .of_match_table = cs35l36_of_match, }, .id_table = cs35l36_id, - .probe = cs35l36_i2c_probe, + .probe_new = cs35l36_i2c_probe, .remove = cs35l36_i2c_remove, };module_i2c_driver (cs35l36_i2c_driver);sound/soc/codecs/cs35l41-i2c.c +2
-3@@ -29,8 +29,7 @@ static const struct i2c_device_id cs35l41_id_i2c[] = {MODULE_DEVICE_TABLE (i2c, cs35l41_id_i2c); -static int cs35l41_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs35l41_i2c_probe (struct i2c_client *client) {struct cs35l41_private *cs35l41;struct device *dev = &client->dev;@@ -91,7 +90,7 @@ static struct i2c_driver cs35l41_i2c_driver = { .acpi_match_table = ACPI_PTR(cs35l41_acpi_match), }, .id_table = cs35l41_id_i2c, - .probe = cs35l41_i2c_probe, + .probe_new = cs35l41_i2c_probe, .remove = cs35l41_i2c_remove, };sound/soc/codecs/cs4234.c +2
-2@@ -731,7 +731,7 @@ static int cs4234_powerup(struct cs4234 *cs4234)return 0 ; } -static int cs4234_i2c_probe (struct i2c_client *i2c_client,const struct i2c_device_id *id) +static int cs4234_i2c_probe (struct i2c_client *i2c_client) {struct cs4234 *cs4234;struct device *dev = &i2c_client->dev;@@ -908,7 +908,7 @@ static struct i2c_driver cs4234_i2c_driver = { .pm = &cs4234_pm, .of_match_table = cs4234_of_match, }, - .probe = cs4234_i2c_probe, + .probe_new = cs4234_i2c_probe, .remove = cs4234_i2c_remove, };module_i2c_driver (cs4234_i2c_driver);sound/soc/codecs/cs4265.c +2
-3@@ -568,8 +568,7 @@ static const struct regmap_config cs4265_regmap = { .cache_type = REGCACHE_RBTREE, }; -static int cs4265_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs4265_i2c_probe (struct i2c_client *i2c_client) {struct cs4265_private *cs4265;int ret;@@ -653,7 +652,7 @@ static struct i2c_driver cs4265_i2c_driver = { .of_match_table = cs4265_of_match, }, .id_table = cs4265_id, - .probe = cs4265_i2c_probe, + .probe_new = cs4265_i2c_probe, .remove = cs4265_i2c_remove, };sound/soc/codecs/cs4270.c +2
-3@@ -677,8 +677,7 @@ static int cs4270_i2c_remove(struct i2c_client *i2c_client)* This function is called whenever the I2C subsystem finds a device that * matches the device ID given via a prior call to i2c_add_driver(). */ -static int cs4270_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs4270_i2c_probe (struct i2c_client *i2c_client) {struct cs4270_private *cs4270;unsigned int val;@@ -765,7 +764,7 @@ static struct i2c_driver cs4270_i2c_driver = { .of_match_table = cs4270_of_match, }, .id_table = cs4270_id, - .probe = cs4270_i2c_probe, + .probe_new = cs4270_i2c_probe, .remove = cs4270_i2c_remove, };sound/soc/codecs/cs4271-i2c.c +2
-3@@ -11,8 +11,7 @@#include <sound/soc.h> #include "cs4271.h" -static int cs4271_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs4271_i2c_probe (struct i2c_client *client) {struct regmap_config config;@@ -35,7 +34,7 @@ static struct i2c_driver cs4271_i2c_driver = { .name = "cs4271", .of_match_table = of_match_ptr(cs4271_dt_ids), }, - .probe = cs4271_i2c_probe, + .probe_new = cs4271_i2c_probe, .id_table = cs4271_i2c_id, };module_i2c_driver (cs4271_i2c_driver);sound/soc/codecs/cs42l42.c +2
-3@@ -2040,8 +2040,7 @@ static int cs42l42_handle_device_data(struct device *dev,return 0 ; } -static int cs42l42_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l42_i2c_probe (struct i2c_client *i2c_client) {struct cs42l42_private *cs42l42;int ret, i, devid;@@ -2240,7 +2239,7 @@ static struct i2c_driver cs42l42_i2c_driver = { .acpi_match_table = ACPI_PTR(cs42l42_acpi_match), }, .id_table = cs42l42_id, - .probe = cs42l42_i2c_probe, + .probe_new = cs42l42_i2c_probe, .remove = cs42l42_i2c_remove, };sound/soc/codecs/cs42l51-i2c.c +2
-3@@ -19,8 +19,7 @@ static struct i2c_device_id cs42l51_i2c_id[] = { };MODULE_DEVICE_TABLE (i2c, cs42l51_i2c_id); -static int cs42l51_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *id) +static int cs42l51_i2c_probe (struct i2c_client *i2c) {struct regmap_config config;@@ -44,7 +43,7 @@ static struct i2c_driver cs42l51_i2c_driver = { .of_match_table = cs42l51_of_match, .pm = &cs42l51_pm_ops, }, - .probe = cs42l51_i2c_probe, + .probe_new = cs42l51_i2c_probe, .remove = cs42l51_i2c_remove, .id_table = cs42l51_i2c_id, };sound/soc/codecs/cs42l52.c +2
-3@@ -1086,8 +1086,7 @@ static const struct regmap_config cs42l52_regmap = { .cache_type = REGCACHE_RBTREE, }; -static int cs42l52_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l52_i2c_probe (struct i2c_client *i2c_client) {struct cs42l52_private *cs42l52;struct cs42l52_platform_data *pdata =dev_get_platdata (&i2c_client->dev);@@ -1226,7 +1225,7 @@ static struct i2c_driver cs42l52_i2c_driver = { .of_match_table = cs42l52_of_match, }, .id_table = cs42l52_id, - .probe = cs42l52_i2c_probe, + .probe_new = cs42l52_i2c_probe, };module_i2c_driver (cs42l52_i2c_driver);sound/soc/codecs/cs42l56.c +2
-3@@ -1167,8 +1167,7 @@ static int cs42l56_handle_of_data(struct i2c_client *i2c_client,return 0 ; } -static int cs42l56_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l56_i2c_probe (struct i2c_client *i2c_client) {struct cs42l56_private *cs42l56; struct cs42l56_platform_data *pdata =@@ -1350,7 +1349,7 @@ static struct i2c_driver cs42l56_i2c_driver = { .of_match_table = cs42l56_of_match, }, .id_table = cs42l56_id, - .probe = cs42l56_i2c_probe, + .probe_new = cs42l56_i2c_probe, .remove = cs42l56_i2c_remove, };sound/soc/codecs/cs42l73.c +2
-3@@ -1274,8 +1274,7 @@ static const struct regmap_config cs42l73_regmap = { .use_single_write = true, }; -static int cs42l73_i2c_probe (struct i2c_client *i2c_client, -const struct i2c_device_id *id) +static int cs42l73_i2c_probe (struct i2c_client *i2c_client) {struct cs42l73_private *cs42l73;struct cs42l73_platform_data *pdata =dev_get_platdata (&i2c_client->dev);@@ -1386,7 +1385,7 @@ static struct i2c_driver cs42l73_i2c_driver = { .of_match_table = cs42l73_of_match, }, .id_table = cs42l73_id, - .probe = cs42l73_i2c_probe, + .probe_new = cs42l73_i2c_probe, };sound/soc/codecs/cs42xx8-i2c.c +2
-3@@ -17,8 +17,7 @@#include "cs42xx8.h" -static int cs42xx8_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *id) +static int cs42xx8_i2c_probe (struct i2c_client *i2c) {int ret =cs42xx8_probe (&i2c->dev,devm_regmap_init_i2c (i2c, &cs42xx8_regmap_config));@@ -51,7 +50,7 @@ static struct i2c_driver cs42xx8_i2c_driver = { .pm = &cs42xx8_pm, .of_match_table = cs42xx8_of_match, }, - .probe = cs42xx8_i2c_probe, + .probe_new = cs42xx8_i2c_probe, .remove = cs42xx8_i2c_remove, .id_table = cs42xx8_i2c_id, };sound/soc/codecs/cs43130.c +2
-3@@ -2418,8 +2418,7 @@ static int cs43130_handle_device_data(struct i2c_client *i2c_client,return 0 ; } -static int cs43130_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs43130_i2c_probe (struct i2c_client *client) {struct cs43130_private *cs43130;int ret;@@ -2702,7 +2701,7 @@ static struct i2c_driver cs43130_i2c_driver = { .pm = &cs43130_runtime_pm, }, .id_table = cs43130_i2c_id, - .probe = cs43130_i2c_probe, + .probe_new = cs43130_i2c_probe, .remove = cs43130_i2c_remove, };sound/soc/codecs/cs4341.c +2
-3@@ -225,8 +225,7 @@ static int cs4341_probe(struct device *dev) }#if IS_ENABLED (CONFIG_I2C ) -static int cs4341_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *id) +static int cs4341_i2c_probe (struct i2c_client *i2c) {struct cs4341_priv *cs4341;@@ -260,7 +259,7 @@ static struct i2c_driver cs4341_i2c_driver = { .name = "cs4341-i2c", .of_match_table =of_match_ptr (cs4341_dt_ids), }, - .probe = cs4341_i2c_probe, + .probe_new = cs4341_i2c_probe, .id_table = cs4341_i2c_id, };#endif sound/soc/codecs/cs4349.c +2
-3@@ -278,8 +278,7 @@ static const struct regmap_config cs4349_regmap = { .cache_type = REGCACHE_RBTREE, }; -static int cs4349_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs4349_i2c_probe (struct i2c_client *client) {struct cs4349_private *cs4349;int ret;@@ -382,7 +381,7 @@ static struct i2c_driver cs4349_i2c_driver = { .pm = &cs4349_runtime_pm, }, .id_table = cs4349_i2c_id, - .probe = cs4349_i2c_probe, + .probe_new = cs4349_i2c_probe, .remove = cs4349_i2c_remove, };sound/soc/codecs/cs53l30.c +2
-3@@ -918,8 +918,7 @@ static struct regmap_config cs53l30_regmap = { .use_single_write = true, }; -static int cs53l30_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs53l30_i2c_probe (struct i2c_client *client) {const struct device_node *np = client->dev.of_node;struct device *dev = &client->dev;@@ -1125,7 +1124,7 @@ static struct i2c_driver cs53l30_i2c_driver = { .pm = &cs53l30_runtime_pm, }, .id_table = cs53l30_id, - .probe = cs53l30_i2c_probe, + .probe_new = cs53l30_i2c_probe, .remove = cs53l30_i2c_remove, };
Quoted 8 lines · Stephen Kitt
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 <[email protected]>---
Thanks,
Charles
Quoted 7 lines · Stephen Kitt
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 <[email protected]>
Looks good and builds fine:
Mark Brown
maintainerQuoted 8 lines · Stephen Kitt
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.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: cs*: use simple i2c probe function
commit: 4a4043456cb82df20e146902cfb3dd84bc393cd3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark