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

ASoC: max9*: 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-6-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Stephen Kitt and committed by
Mark Brown
fead49e3 182f3ebd

+24 -35
+2 -3
sound/soc/codecs/max9768.c
··· 167 167 .cache_type = REGCACHE_RBTREE, 168 168 }; 169 169 170 - static int max9768_i2c_probe(struct i2c_client *client, 171 - const struct i2c_device_id *id) 170 + static int max9768_i2c_probe(struct i2c_client *client) 172 171 { 173 172 struct max9768 *max9768; 174 173 struct max9768_pdata *pdata = client->dev.platform_data; ··· 214 215 .driver = { 215 216 .name = "max9768", 216 217 }, 217 - .probe = max9768_i2c_probe, 218 + .probe_new = max9768_i2c_probe, 218 219 .id_table = max9768_i2c_id, 219 220 }; 220 221 module_i2c_driver(max9768_i2c_driver);
+2 -3
sound/soc/codecs/max98371.c
··· 365 365 .cache_type = REGCACHE_RBTREE, 366 366 }; 367 367 368 - static int max98371_i2c_probe(struct i2c_client *i2c, 369 - const struct i2c_device_id *id) 368 + static int max98371_i2c_probe(struct i2c_client *i2c) 370 369 { 371 370 struct max98371_priv *max98371; 372 371 int ret, reg; ··· 420 421 .name = "max98371", 421 422 .of_match_table = of_match_ptr(max98371_of_match), 422 423 }, 423 - .probe = max98371_i2c_probe, 424 + .probe_new = max98371_i2c_probe, 424 425 .id_table = max98371_i2c_id, 425 426 }; 426 427
+2 -3
sound/soc/codecs/max98373-i2c.c
··· 516 516 .cache_type = REGCACHE_RBTREE, 517 517 }; 518 518 519 - static int max98373_i2c_probe(struct i2c_client *i2c, 520 - const struct i2c_device_id *id) 519 + static int max98373_i2c_probe(struct i2c_client *i2c) 521 520 { 522 521 int ret = 0; 523 522 int reg = 0; ··· 621 622 .acpi_match_table = ACPI_PTR(max98373_acpi_match), 622 623 .pm = &max98373_pm, 623 624 }, 624 - .probe = max98373_i2c_probe, 625 + .probe_new = max98373_i2c_probe, 625 626 .id_table = max98373_i2c_id, 626 627 }; 627 628
+2 -3
sound/soc/codecs/max98390.c
··· 1014 1014 max98390->i_l_slot = 1; 1015 1015 } 1016 1016 1017 - static int max98390_i2c_probe(struct i2c_client *i2c, 1018 - const struct i2c_device_id *id) 1017 + static int max98390_i2c_probe(struct i2c_client *i2c) 1019 1018 { 1020 1019 int ret = 0; 1021 1020 int reg = 0; ··· 1120 1121 .acpi_match_table = ACPI_PTR(max98390_acpi_match), 1121 1122 .pm = &max98390_pm, 1122 1123 }, 1123 - .probe = max98390_i2c_probe, 1124 + .probe_new = max98390_i2c_probe, 1124 1125 .id_table = max98390_i2c_id, 1125 1126 }; 1126 1127
+2 -3
sound/soc/codecs/max9850.c
··· 299 299 .non_legacy_dai_naming = 1, 300 300 }; 301 301 302 - static int max9850_i2c_probe(struct i2c_client *i2c, 303 - const struct i2c_device_id *id) 302 + static int max9850_i2c_probe(struct i2c_client *i2c) 304 303 { 305 304 struct max9850_priv *max9850; 306 305 int ret; ··· 330 331 .driver = { 331 332 .name = "max9850", 332 333 }, 333 - .probe = max9850_i2c_probe, 334 + .probe_new = max9850_i2c_probe, 334 335 .id_table = max9850_i2c_id, 335 336 }; 336 337
+2 -3
sound/soc/codecs/max98504.c
··· 304 304 .cache_type = REGCACHE_RBTREE, 305 305 }; 306 306 307 - static int max98504_i2c_probe(struct i2c_client *client, 308 - const struct i2c_device_id *id) 307 + static int max98504_i2c_probe(struct i2c_client *client) 309 308 { 310 309 struct device *dev = &client->dev; 311 310 struct device_node *node = dev->of_node; ··· 370 371 .name = "max98504", 371 372 .of_match_table = of_match_ptr(max98504_of_match), 372 373 }, 373 - .probe = max98504_i2c_probe, 374 + .probe_new = max98504_i2c_probe, 374 375 .id_table = max98504_i2c_id, 375 376 }; 376 377 module_i2c_driver(max98504_i2c_driver);
+2 -2
sound/soc/codecs/max98520.c
··· 677 677 gpiod_set_value_cansleep(max98520->reset_gpio, !poweron); 678 678 } 679 679 680 - static int max98520_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) 680 + static int max98520_i2c_probe(struct i2c_client *i2c) 681 681 { 682 682 int ret; 683 683 int reg = 0; ··· 757 757 .of_match_table = of_match_ptr(max98520_of_match), 758 758 .pm = &max98520_pm, 759 759 }, 760 - .probe = max98520_i2c_probe, 760 + .probe_new = max98520_i2c_probe, 761 761 .id_table = max98520_i2c_id, 762 762 }; 763 763
+2 -3
sound/soc/codecs/max9867.c
··· 613 613 .cache_type = REGCACHE_RBTREE, 614 614 }; 615 615 616 - static int max9867_i2c_probe(struct i2c_client *i2c, 617 - const struct i2c_device_id *id) 616 + static int max9867_i2c_probe(struct i2c_client *i2c) 618 617 { 619 618 struct max9867_priv *max9867; 620 619 int ret, reg; ··· 661 662 .name = "max9867", 662 663 .of_match_table = of_match_ptr(max9867_of_match), 663 664 }, 664 - .probe = max9867_i2c_probe, 665 + .probe_new = max9867_i2c_probe, 665 666 .id_table = max9867_i2c_id, 666 667 }; 667 668
+2 -3
sound/soc/codecs/max9877.c
··· 133 133 .cache_type = REGCACHE_RBTREE, 134 134 }; 135 135 136 - static int max9877_i2c_probe(struct i2c_client *client, 137 - const struct i2c_device_id *id) 136 + static int max9877_i2c_probe(struct i2c_client *client) 138 137 { 139 138 struct regmap *regmap; 140 139 int i; ··· 160 161 .driver = { 161 162 .name = "max9877", 162 163 }, 163 - .probe = max9877_i2c_probe, 164 + .probe_new = max9877_i2c_probe, 164 165 .id_table = max9877_i2c_id, 165 166 }; 166 167
+2 -3
sound/soc/codecs/max98925.c
··· 558 558 .cache_type = REGCACHE_RBTREE, 559 559 }; 560 560 561 - static int max98925_i2c_probe(struct i2c_client *i2c, 562 - const struct i2c_device_id *id) 561 + static int max98925_i2c_probe(struct i2c_client *i2c) 563 562 { 564 563 int ret, reg; 565 564 u32 value; ··· 636 637 .name = "max98925", 637 638 .of_match_table = of_match_ptr(max98925_of_match), 638 639 }, 639 - .probe = max98925_i2c_probe, 640 + .probe_new = max98925_i2c_probe, 640 641 .id_table = max98925_i2c_id, 641 642 }; 642 643
+2 -3
sound/soc/codecs/max98926.c
··· 510 510 .cache_type = REGCACHE_RBTREE, 511 511 }; 512 512 513 - static int max98926_i2c_probe(struct i2c_client *i2c, 514 - const struct i2c_device_id *id) 513 + static int max98926_i2c_probe(struct i2c_client *i2c) 515 514 { 516 515 int ret, reg; 517 516 u32 value; ··· 583 584 .name = "max98926", 584 585 .of_match_table = of_match_ptr(max98926_of_match), 585 586 }, 586 - .probe = max98926_i2c_probe, 587 + .probe_new = max98926_i2c_probe, 587 588 .id_table = max98926_i2c_id, 588 589 }; 589 590
+2 -3
sound/soc/codecs/max98927.c
··· 863 863 max98927->i_l_slot = 1; 864 864 } 865 865 866 - static int max98927_i2c_probe(struct i2c_client *i2c, 867 - const struct i2c_device_id *id) 866 + static int max98927_i2c_probe(struct i2c_client *i2c) 868 867 { 869 868 870 869 int ret = 0, value; ··· 976 977 .acpi_match_table = ACPI_PTR(max98927_acpi_match), 977 978 .pm = &max98927_pm, 978 979 }, 979 - .probe = max98927_i2c_probe, 980 + .probe_new = max98927_i2c_probe, 980 981 .remove = max98927_i2c_remove, 981 982 .id_table = max98927_i2c_id, 982 983 };