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

ASoC: rt*: 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/20220405130326.2107293-1-steve@sk2.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f950ef91
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2433,8 +2433,7 @@ static int rt1011_parse_dp(struct rt1011_priv *rt1011, struct device *dev)
	return 0;
}

static int rt1011_i2c_probe(struct i2c_client *i2c,
		    const struct i2c_device_id *id)
static int rt1011_i2c_probe(struct i2c_client *i2c)
{
	struct rt1011_priv *rt1011;
	int ret;
@@ -2485,7 +2484,7 @@ static struct i2c_driver rt1011_i2c_driver = {
		.of_match_table = of_match_ptr(rt1011_of_match),
		.acpi_match_table = ACPI_PTR(rt1011_acpi_match)
	},
	.probe = rt1011_i2c_probe,
	.probe_new = rt1011_i2c_probe,
	.shutdown = rt1011_i2c_shutdown,
	.id_table = rt1011_i2c_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -1113,8 +1113,7 @@ static void rt1015_parse_dt(struct rt1015_priv *rt1015, struct device *dev)
		&rt1015->pdata.power_up_delay_ms);
}

static int rt1015_i2c_probe(struct i2c_client *i2c,
	const struct i2c_device_id *id)
static int rt1015_i2c_probe(struct i2c_client *i2c)
{
	struct rt1015_platform_data *pdata = dev_get_platdata(&i2c->dev);
	struct rt1015_priv *rt1015;
@@ -1172,7 +1171,7 @@ static struct i2c_driver rt1015_i2c_driver = {
		.of_match_table = of_match_ptr(rt1015_of_match),
		.acpi_match_table = ACPI_PTR(rt1015_acpi_match),
	},
	.probe = rt1015_i2c_probe,
	.probe_new = rt1015_i2c_probe,
	.shutdown = rt1015_i2c_shutdown,
	.id_table = rt1015_i2c_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -631,8 +631,7 @@ static const struct acpi_device_id rt1016_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, rt1016_acpi_match);
#endif

static int rt1016_i2c_probe(struct i2c_client *i2c,
	const struct i2c_device_id *id)
static int rt1016_i2c_probe(struct i2c_client *i2c)
{
	struct rt1016_priv *rt1016;
	int ret;
@@ -685,7 +684,7 @@ static struct i2c_driver rt1016_i2c_driver = {
		.of_match_table = of_match_ptr(rt1016_of_match),
		.acpi_match_table = ACPI_PTR(rt1016_acpi_match),
	},
	.probe = rt1016_i2c_probe,
	.probe_new = rt1016_i2c_probe,
	.shutdown = rt1016_i2c_shutdown,
	.id_table = rt1016_i2c_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -558,8 +558,7 @@ static const struct acpi_device_id rt1019_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, rt1019_acpi_match);
#endif

static int rt1019_i2c_probe(struct i2c_client *i2c,
	const struct i2c_device_id *id)
static int rt1019_i2c_probe(struct i2c_client *i2c)
{
	struct rt1019_priv *rt1019;
	int ret;
@@ -599,7 +598,7 @@ static struct i2c_driver rt1019_i2c_driver = {
		.of_match_table = of_match_ptr(rt1019_of_match),
		.acpi_match_table = ACPI_PTR(rt1019_acpi_match),
	},
	.probe = rt1019_i2c_probe,
	.probe_new = rt1019_i2c_probe,
	.id_table = rt1019_i2c_id,
};
module_i2c_driver(rt1019_i2c_driver);
+2 −3
Original line number Diff line number Diff line
@@ -1117,8 +1117,7 @@ static void rt1305_calibrate(struct rt1305_priv *rt1305)
	regcache_cache_bypass(rt1305->regmap, false);
}

static int rt1305_i2c_probe(struct i2c_client *i2c,
		    const struct i2c_device_id *id)
static int rt1305_i2c_probe(struct i2c_client *i2c)
{
	struct rt1305_priv *rt1305;
	int ret;
@@ -1172,7 +1171,7 @@ static struct i2c_driver rt1305_i2c_driver = {
		.acpi_match_table = ACPI_PTR(rt1305_acpi_match)
#endif
	},
	.probe = rt1305_i2c_probe,
	.probe_new = rt1305_i2c_probe,
	.shutdown = rt1305_i2c_shutdown,
	.id_table = rt1305_i2c_id,
};
Loading