Commit 7325ed4d authored by Stephen Kitt's avatar Stephen Kitt Committed by Mark Brown

ASoC: nau8*: 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-8-steve@sk2.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f7537e3a
...@@ -823,8 +823,7 @@ static const struct regmap_config nau8540_regmap_config = { ...@@ -823,8 +823,7 @@ static const struct regmap_config nau8540_regmap_config = {
.num_reg_defaults = ARRAY_SIZE(nau8540_reg_defaults), .num_reg_defaults = ARRAY_SIZE(nau8540_reg_defaults),
}; };
static int nau8540_i2c_probe(struct i2c_client *i2c, static int nau8540_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
struct nau8540 *nau8540 = dev_get_platdata(dev); struct nau8540 *nau8540 = dev_get_platdata(dev);
...@@ -874,7 +873,7 @@ static struct i2c_driver nau8540_i2c_driver = { ...@@ -874,7 +873,7 @@ static struct i2c_driver nau8540_i2c_driver = {
.name = "nau8540", .name = "nau8540",
.of_match_table = of_match_ptr(nau8540_of_ids), .of_match_table = of_match_ptr(nau8540_of_ids),
}, },
.probe = nau8540_i2c_probe, .probe_new = nau8540_i2c_probe,
.id_table = nau8540_i2c_ids, .id_table = nau8540_i2c_ids,
}; };
module_i2c_driver(nau8540_i2c_driver); module_i2c_driver(nau8540_i2c_driver);
......
...@@ -869,8 +869,7 @@ static const struct snd_soc_component_driver nau8810_component_driver = { ...@@ -869,8 +869,7 @@ static const struct snd_soc_component_driver nau8810_component_driver = {
.non_legacy_dai_naming = 1, .non_legacy_dai_naming = 1,
}; };
static int nau8810_i2c_probe(struct i2c_client *i2c, static int nau8810_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
struct nau8810 *nau8810 = dev_get_platdata(dev); struct nau8810 *nau8810 = dev_get_platdata(dev);
...@@ -916,7 +915,7 @@ static struct i2c_driver nau8810_i2c_driver = { ...@@ -916,7 +915,7 @@ static struct i2c_driver nau8810_i2c_driver = {
.name = "nau8810", .name = "nau8810",
.of_match_table = of_match_ptr(nau8810_of_match), .of_match_table = of_match_ptr(nau8810_of_match),
}, },
.probe = nau8810_i2c_probe, .probe_new = nau8810_i2c_probe,
.id_table = nau8810_i2c_id, .id_table = nau8810_i2c_id,
}; };
......
...@@ -1626,8 +1626,7 @@ static int nau8821_setup_irq(struct nau8821 *nau8821) ...@@ -1626,8 +1626,7 @@ static int nau8821_setup_irq(struct nau8821 *nau8821)
return 0; return 0;
} }
static int nau8821_i2c_probe(struct i2c_client *i2c, static int nau8821_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
struct nau8821 *nau8821 = dev_get_platdata(&i2c->dev); struct nau8821 *nau8821 = dev_get_platdata(&i2c->dev);
...@@ -1703,7 +1702,7 @@ static struct i2c_driver nau8821_driver = { ...@@ -1703,7 +1702,7 @@ static struct i2c_driver nau8821_driver = {
.of_match_table = of_match_ptr(nau8821_of_ids), .of_match_table = of_match_ptr(nau8821_of_ids),
.acpi_match_table = ACPI_PTR(nau8821_acpi_match), .acpi_match_table = ACPI_PTR(nau8821_acpi_match),
}, },
.probe = nau8821_i2c_probe, .probe_new = nau8821_i2c_probe,
.remove = nau8821_i2c_remove, .remove = nau8821_i2c_remove,
.id_table = nau8821_i2c_ids, .id_table = nau8821_i2c_ids,
}; };
......
...@@ -1083,8 +1083,7 @@ static const struct regmap_config nau8822_regmap_config = { ...@@ -1083,8 +1083,7 @@ static const struct regmap_config nau8822_regmap_config = {
.num_reg_defaults = ARRAY_SIZE(nau8822_reg_defaults), .num_reg_defaults = ARRAY_SIZE(nau8822_reg_defaults),
}; };
static int nau8822_i2c_probe(struct i2c_client *i2c, static int nau8822_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
struct nau8822 *nau8822 = dev_get_platdata(dev); struct nau8822 *nau8822 = dev_get_platdata(dev);
...@@ -1141,7 +1140,7 @@ static struct i2c_driver nau8822_i2c_driver = { ...@@ -1141,7 +1140,7 @@ static struct i2c_driver nau8822_i2c_driver = {
.name = "nau8822", .name = "nau8822",
.of_match_table = of_match_ptr(nau8822_of_match), .of_match_table = of_match_ptr(nau8822_of_match),
}, },
.probe = nau8822_i2c_probe, .probe_new = nau8822_i2c_probe,
.id_table = nau8822_i2c_id, .id_table = nau8822_i2c_id,
}; };
module_i2c_driver(nau8822_i2c_driver); module_i2c_driver(nau8822_i2c_driver);
......
...@@ -1910,8 +1910,7 @@ const char *nau8824_components(void) ...@@ -1910,8 +1910,7 @@ const char *nau8824_components(void)
} }
EXPORT_SYMBOL_GPL(nau8824_components); EXPORT_SYMBOL_GPL(nau8824_components);
static int nau8824_i2c_probe(struct i2c_client *i2c, static int nau8824_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
struct nau8824 *nau8824 = dev_get_platdata(dev); struct nau8824 *nau8824 = dev_get_platdata(dev);
...@@ -1985,7 +1984,7 @@ static struct i2c_driver nau8824_i2c_driver = { ...@@ -1985,7 +1984,7 @@ static struct i2c_driver nau8824_i2c_driver = {
.of_match_table = of_match_ptr(nau8824_of_ids), .of_match_table = of_match_ptr(nau8824_of_ids),
.acpi_match_table = ACPI_PTR(nau8824_acpi_match), .acpi_match_table = ACPI_PTR(nau8824_acpi_match),
}, },
.probe = nau8824_i2c_probe, .probe_new = nau8824_i2c_probe,
.id_table = nau8824_i2c_ids, .id_table = nau8824_i2c_ids,
}; };
module_i2c_driver(nau8824_i2c_driver); module_i2c_driver(nau8824_i2c_driver);
......
...@@ -2613,8 +2613,7 @@ static int nau8825_setup_irq(struct nau8825 *nau8825) ...@@ -2613,8 +2613,7 @@ static int nau8825_setup_irq(struct nau8825 *nau8825)
return 0; return 0;
} }
static int nau8825_i2c_probe(struct i2c_client *i2c, static int nau8825_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
struct nau8825 *nau8825 = dev_get_platdata(&i2c->dev); struct nau8825 *nau8825 = dev_get_platdata(&i2c->dev);
...@@ -2703,7 +2702,7 @@ static struct i2c_driver nau8825_driver = { ...@@ -2703,7 +2702,7 @@ static struct i2c_driver nau8825_driver = {
.of_match_table = of_match_ptr(nau8825_of_ids), .of_match_table = of_match_ptr(nau8825_of_ids),
.acpi_match_table = ACPI_PTR(nau8825_acpi_match), .acpi_match_table = ACPI_PTR(nau8825_acpi_match),
}, },
.probe = nau8825_i2c_probe, .probe_new = nau8825_i2c_probe,
.remove = nau8825_i2c_remove, .remove = nau8825_i2c_remove,
.id_table = nau8825_i2c_ids, .id_table = nau8825_i2c_ids,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment