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

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.

Signed-off-by: default avatarStephen Kitt <steve@sk2.org>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarLucas Tanure <tanureal@opensource.cirrus.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220325170734.1216018-1-steve@sk2.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6d8f318b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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,
};

+2 −3
Original line number Diff line number Diff line
@@ -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,

};
+2 −3
Original line number Diff line number Diff line
@@ -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,

};
+2 −3
Original line number Diff line number Diff line
@@ -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,
};

+2 −3
Original line number Diff line number Diff line
@@ -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);
Loading