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

ASoC: wm*: 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.

wm8731.c is excluded and will be submitted separately.

This avoids scanning the identifier tables during probes.

Signed-off-by: default avatarStephen Kitt <steve@sk2.org>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220405122411.2096387-1-steve@sk2.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6b84012e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -192,8 +192,7 @@ static void wm1250_ev1_free(struct i2c_client *i2c)
		gpio_free_array(wm1250->gpios, ARRAY_SIZE(wm1250->gpios));
}

static int wm1250_ev1_probe(struct i2c_client *i2c,
			    const struct i2c_device_id *i2c_id)
static int wm1250_ev1_probe(struct i2c_client *i2c)
{
	int id, board, rev, ret;

@@ -247,7 +246,7 @@ static struct i2c_driver wm1250_ev1_i2c_driver = {
	.driver = {
		.name = "wm1250-ev1",
	},
	.probe =    wm1250_ev1_probe,
	.probe_new = wm1250_ev1_probe,
	.remove =   wm1250_ev1_remove,
	.id_table = wm1250_ev1_i2c_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -807,8 +807,7 @@ static const struct snd_soc_component_driver soc_component_dev_wm2000 = {
	.non_legacy_dai_naming	= 1,
};

static int wm2000_i2c_probe(struct i2c_client *i2c,
			    const struct i2c_device_id *i2c_id)
static int wm2000_i2c_probe(struct i2c_client *i2c)
{
	struct wm2000_priv *wm2000;
	struct wm2000_platform_data *pdata;
@@ -941,7 +940,7 @@ static struct i2c_driver wm2000_i2c_driver = {
	.driver = {
		.name = "wm2000",
	},
	.probe = wm2000_i2c_probe,
	.probe_new = wm2000_i2c_probe,
	.id_table = wm2000_i2c_id,
};

+2 −3
Original line number Diff line number Diff line
@@ -2176,8 +2176,7 @@ static const unsigned int wm2200_mic_ctrl_reg[] = {
	WM2200_IN3L_CONTROL,
};

static int wm2200_i2c_probe(struct i2c_client *i2c,
			    const struct i2c_device_id *id)
static int wm2200_i2c_probe(struct i2c_client *i2c)
{
	struct wm2200_pdata *pdata = dev_get_platdata(&i2c->dev);
	struct wm2200_priv *wm2200;
@@ -2489,7 +2488,7 @@ static struct i2c_driver wm2200_i2c_driver = {
		.name = "wm2200",
		.pm = &wm2200_pm,
	},
	.probe =    wm2200_i2c_probe,
	.probe_new = wm2200_i2c_probe,
	.remove =   wm2200_i2c_remove,
	.id_table = wm2200_i2c_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -2411,8 +2411,7 @@ static const unsigned int wm5100_mic_ctrl_reg[] = {
	WM5100_IN4L_CONTROL,
};

static int wm5100_i2c_probe(struct i2c_client *i2c,
			    const struct i2c_device_id *id)
static int wm5100_i2c_probe(struct i2c_client *i2c)
{
	struct wm5100_pdata *pdata = dev_get_platdata(&i2c->dev);
	struct wm5100_priv *wm5100;
@@ -2713,7 +2712,7 @@ static struct i2c_driver wm5100_i2c_driver = {
		.name = "wm5100",
		.pm = &wm5100_pm,
	},
	.probe =    wm5100_i2c_probe,
	.probe_new = wm5100_i2c_probe,
	.remove =   wm5100_i2c_remove,
	.id_table = wm5100_i2c_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -646,8 +646,7 @@ static struct spi_driver wm8510_spi_driver = {
#endif /* CONFIG_SPI_MASTER */

#if IS_ENABLED(CONFIG_I2C)
static int wm8510_i2c_probe(struct i2c_client *i2c,
			    const struct i2c_device_id *id)
static int wm8510_i2c_probe(struct i2c_client *i2c)
{
	struct wm8510_priv *wm8510;
	int ret;
@@ -680,7 +679,7 @@ static struct i2c_driver wm8510_i2c_driver = {
		.name = "wm8510",
		.of_match_table = wm8510_of_match,
	},
	.probe =    wm8510_i2c_probe,
	.probe_new = wm8510_i2c_probe,
	.id_table = wm8510_i2c_id,
};
#endif
Loading