Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220405165836.2165310-13-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Stephen Kitt and committed by
Mark Brown
9ba0daa6 33108917

+6 -9
+2 -3
sound/soc/codecs/tlv320adcx140.c
··· 1083 1083 MODULE_DEVICE_TABLE(of, tlv320adcx140_of_match); 1084 1084 #endif 1085 1085 1086 - static int adcx140_i2c_probe(struct i2c_client *i2c, 1087 - const struct i2c_device_id *id) 1086 + static int adcx140_i2c_probe(struct i2c_client *i2c) 1088 1087 { 1089 1088 struct adcx140_priv *adcx140; 1090 1089 int ret; ··· 1142 1143 .name = "tlv320adcx140-codec", 1143 1144 .of_match_table = of_match_ptr(tlv320adcx140_of_match), 1144 1145 }, 1145 - .probe = adcx140_i2c_probe, 1146 + .probe_new = adcx140_i2c_probe, 1146 1147 .id_table = adcx140_i2c_id, 1147 1148 }; 1148 1149 module_i2c_driver(adcx140_i2c_driver);
+2 -3
sound/soc/codecs/tlv320aic23-i2c.c
··· 16 16 17 17 #include "tlv320aic23.h" 18 18 19 - static int tlv320aic23_i2c_probe(struct i2c_client *i2c, 20 - const struct i2c_device_id *i2c_id) 19 + static int tlv320aic23_i2c_probe(struct i2c_client *i2c) 21 20 { 22 21 struct regmap *regmap; 23 22 ··· 47 48 .name = "tlv320aic23-codec", 48 49 .of_match_table = of_match_ptr(tlv320aic23_of_match), 49 50 }, 50 - .probe = tlv320aic23_i2c_probe, 51 + .probe_new = tlv320aic23_i2c_probe, 51 52 .id_table = tlv320aic23_id, 52 53 }; 53 54
+2 -3
sound/soc/codecs/tlv320dac33.c
··· 1463 1463 .ops = &dac33_dai_ops, 1464 1464 }; 1465 1465 1466 - static int dac33_i2c_probe(struct i2c_client *client, 1467 - const struct i2c_device_id *id) 1466 + static int dac33_i2c_probe(struct i2c_client *client) 1468 1467 { 1469 1468 struct tlv320dac33_platform_data *pdata; 1470 1469 struct tlv320dac33_priv *dac33; ··· 1565 1566 .driver = { 1566 1567 .name = "tlv320dac33-codec", 1567 1568 }, 1568 - .probe = dac33_i2c_probe, 1569 + .probe_new = dac33_i2c_probe, 1569 1570 .remove = dac33_i2c_remove, 1570 1571 .id_table = tlv320dac33_i2c_id, 1571 1572 };