Unverified Commit fead49e3 authored by Stephen Kitt's avatar Stephen Kitt Committed by Mark Brown
Browse files

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: default avatarStephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220405165836.2165310-6-steve@sk2.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 182f3ebd
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -167,8 +167,7 @@ static const struct regmap_config max9768_i2c_regmap_config = {
	.cache_type = REGCACHE_RBTREE,
};

static int max9768_i2c_probe(struct i2c_client *client,
			     const struct i2c_device_id *id)
static int max9768_i2c_probe(struct i2c_client *client)
{
	struct max9768 *max9768;
	struct max9768_pdata *pdata = client->dev.platform_data;
@@ -215,7 +214,7 @@ static struct i2c_driver max9768_i2c_driver = {
	.driver = {
		.name = "max9768",
	},
	.probe = max9768_i2c_probe,
	.probe_new = max9768_i2c_probe,
	.id_table = max9768_i2c_id,
};
module_i2c_driver(max9768_i2c_driver);
+2 −3
Original line number Diff line number Diff line
@@ -365,8 +365,7 @@ static const struct regmap_config max98371_regmap = {
	.cache_type       = REGCACHE_RBTREE,
};

static int max98371_i2c_probe(struct i2c_client *i2c,
		const struct i2c_device_id *id)
static int max98371_i2c_probe(struct i2c_client *i2c)
{
	struct max98371_priv *max98371;
	int ret, reg;
@@ -421,7 +420,7 @@ static struct i2c_driver max98371_i2c_driver = {
		.name = "max98371",
		.of_match_table = of_match_ptr(max98371_of_match),
	},
	.probe  = max98371_i2c_probe,
	.probe_new  = max98371_i2c_probe,
	.id_table = max98371_i2c_id,
};

+2 −3
Original line number Diff line number Diff line
@@ -516,8 +516,7 @@ static const struct regmap_config max98373_regmap = {
	.cache_type = REGCACHE_RBTREE,
};

static int max98373_i2c_probe(struct i2c_client *i2c,
			      const struct i2c_device_id *id)
static int max98373_i2c_probe(struct i2c_client *i2c)
{
	int ret = 0;
	int reg = 0;
@@ -622,7 +621,7 @@ static struct i2c_driver max98373_i2c_driver = {
		.acpi_match_table = ACPI_PTR(max98373_acpi_match),
		.pm = &max98373_pm,
	},
	.probe = max98373_i2c_probe,
	.probe_new = max98373_i2c_probe,
	.id_table = max98373_i2c_id,
};

+2 −3
Original line number Diff line number Diff line
@@ -1014,8 +1014,7 @@ static void max98390_slot_config(struct i2c_client *i2c,
		max98390->i_l_slot = 1;
}

static int max98390_i2c_probe(struct i2c_client *i2c,
		const struct i2c_device_id *id)
static int max98390_i2c_probe(struct i2c_client *i2c)
{
	int ret = 0;
	int reg = 0;
@@ -1121,7 +1120,7 @@ static struct i2c_driver max98390_i2c_driver = {
		.acpi_match_table = ACPI_PTR(max98390_acpi_match),
		.pm = &max98390_pm,
	},
	.probe = max98390_i2c_probe,
	.probe_new = max98390_i2c_probe,
	.id_table = max98390_i2c_id,
};

+2 −3
Original line number Diff line number Diff line
@@ -299,8 +299,7 @@ static const struct snd_soc_component_driver soc_component_dev_max9850 = {
	.non_legacy_dai_naming	= 1,
};

static int max9850_i2c_probe(struct i2c_client *i2c,
			     const struct i2c_device_id *id)
static int max9850_i2c_probe(struct i2c_client *i2c)
{
	struct max9850_priv *max9850;
	int ret;
@@ -331,7 +330,7 @@ static struct i2c_driver max9850_i2c_driver = {
	.driver = {
		.name = "max9850",
	},
	.probe = max9850_i2c_probe,
	.probe_new = max9850_i2c_probe,
	.id_table = max9850_i2c_id,
};

Loading