Commit 7f7d7214 authored by Stephen Kitt's avatar Stephen Kitt Committed by Mark Brown

ASoC: pcm*: 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-9-steve@sk2.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7325ed4d
...@@ -299,8 +299,7 @@ static const struct i2c_device_id pcm1681_i2c_id[] = { ...@@ -299,8 +299,7 @@ static const struct i2c_device_id pcm1681_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, pcm1681_i2c_id); MODULE_DEVICE_TABLE(i2c, pcm1681_i2c_id);
static int pcm1681_i2c_probe(struct i2c_client *client, static int pcm1681_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
int ret; int ret;
struct pcm1681_private *priv; struct pcm1681_private *priv;
...@@ -329,7 +328,7 @@ static struct i2c_driver pcm1681_i2c_driver = { ...@@ -329,7 +328,7 @@ static struct i2c_driver pcm1681_i2c_driver = {
.of_match_table = of_match_ptr(pcm1681_dt_ids), .of_match_table = of_match_ptr(pcm1681_dt_ids),
}, },
.id_table = pcm1681_i2c_id, .id_table = pcm1681_i2c_id,
.probe = pcm1681_i2c_probe, .probe_new = pcm1681_i2c_probe,
}; };
module_i2c_driver(pcm1681_i2c_driver); module_i2c_driver(pcm1681_i2c_driver);
......
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
#include "pcm1789.h" #include "pcm1789.h"
static int pcm1789_i2c_probe(struct i2c_client *client, static int pcm1789_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct regmap *regmap; struct regmap *regmap;
int ret; int ret;
...@@ -53,7 +52,7 @@ static struct i2c_driver pcm1789_i2c_driver = { ...@@ -53,7 +52,7 @@ static struct i2c_driver pcm1789_i2c_driver = {
.of_match_table = of_match_ptr(pcm1789_of_match), .of_match_table = of_match_ptr(pcm1789_of_match),
}, },
.id_table = pcm1789_i2c_ids, .id_table = pcm1789_i2c_ids,
.probe = pcm1789_i2c_probe, .probe_new = pcm1789_i2c_probe,
.remove = pcm1789_i2c_remove, .remove = pcm1789_i2c_remove,
}; };
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
#include "pcm179x.h" #include "pcm179x.h"
static int pcm179x_i2c_probe(struct i2c_client *client, static int pcm179x_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct regmap *regmap; struct regmap *regmap;
int ret; int ret;
...@@ -50,7 +49,7 @@ static struct i2c_driver pcm179x_i2c_driver = { ...@@ -50,7 +49,7 @@ static struct i2c_driver pcm179x_i2c_driver = {
.of_match_table = of_match_ptr(pcm179x_of_match), .of_match_table = of_match_ptr(pcm179x_of_match),
}, },
.id_table = pcm179x_i2c_ids, .id_table = pcm179x_i2c_ids,
.probe = pcm179x_i2c_probe, .probe_new = pcm179x_i2c_probe,
}; };
module_i2c_driver(pcm179x_i2c_driver); module_i2c_driver(pcm179x_i2c_driver);
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
#include "pcm3168a.h" #include "pcm3168a.h"
static int pcm3168a_i2c_probe(struct i2c_client *i2c, static int pcm3168a_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct regmap *regmap; struct regmap *regmap;
...@@ -47,7 +46,7 @@ static const struct of_device_id pcm3168a_of_match[] = { ...@@ -47,7 +46,7 @@ static const struct of_device_id pcm3168a_of_match[] = {
MODULE_DEVICE_TABLE(of, pcm3168a_of_match); MODULE_DEVICE_TABLE(of, pcm3168a_of_match);
static struct i2c_driver pcm3168a_i2c_driver = { static struct i2c_driver pcm3168a_i2c_driver = {
.probe = pcm3168a_i2c_probe, .probe_new = pcm3168a_i2c_probe,
.remove = pcm3168a_i2c_remove, .remove = pcm3168a_i2c_remove,
.id_table = pcm3168a_i2c_id, .id_table = pcm3168a_i2c_id,
.driver = { .driver = {
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
#include "pcm512x.h" #include "pcm512x.h"
static int pcm512x_i2c_probe(struct i2c_client *i2c, static int pcm512x_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *id)
{ {
struct regmap *regmap; struct regmap *regmap;
struct regmap_config config = pcm512x_regmap; struct regmap_config config = pcm512x_regmap;
...@@ -68,7 +67,7 @@ MODULE_DEVICE_TABLE(acpi, pcm512x_acpi_match); ...@@ -68,7 +67,7 @@ MODULE_DEVICE_TABLE(acpi, pcm512x_acpi_match);
#endif #endif
static struct i2c_driver pcm512x_i2c_driver = { static struct i2c_driver pcm512x_i2c_driver = {
.probe = pcm512x_i2c_probe, .probe_new = pcm512x_i2c_probe,
.remove = pcm512x_i2c_remove, .remove = pcm512x_i2c_remove,
.id_table = pcm512x_i2c_id, .id_table = pcm512x_i2c_id,
.driver = { .driver = {
......
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