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: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220405130326.2107293-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Stephen Kitt 2022-04-05 15:03:26 +02:00 committed by Mark Brown
parent f950ef9180
commit 35b8885805
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
23 changed files with 46 additions and 69 deletions

View File

@ -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,
};

View File

@ -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,
};

View File

@ -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,
};

View File

@ -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);

View File

@ -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,
};

View File

@ -814,8 +814,7 @@ static void rt1308_efuse(struct rt1308_priv *rt1308)
regmap_write(rt1308->regmap, RT1308_PVDD_OFFSET_CTL, 0x10000000);
}
static int rt1308_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt1308_i2c_probe(struct i2c_client *i2c)
{
struct rt1308_priv *rt1308;
int ret;
@ -864,7 +863,7 @@ static struct i2c_driver rt1308_i2c_driver = {
.of_match_table = of_match_ptr(rt1308_of_match),
.acpi_match_table = ACPI_PTR(rt1308_acpi_match),
},
.probe = rt1308_i2c_probe,
.probe_new = rt1308_i2c_probe,
.shutdown = rt1308_i2c_shutdown,
.id_table = rt1308_i2c_id,
};

View File

@ -1114,8 +1114,7 @@ static const struct acpi_device_id rt274_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, rt274_acpi_match);
#endif
static int rt274_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt274_i2c_probe(struct i2c_client *i2c)
{
struct rt274_priv *rt274;
@ -1227,7 +1226,7 @@ static struct i2c_driver rt274_i2c_driver = {
.of_match_table = of_match_ptr(rt274_of_match),
#endif
},
.probe = rt274_i2c_probe,
.probe_new = rt274_i2c_probe,
.remove = rt274_i2c_remove,
.id_table = rt274_i2c_id,
};

View File

@ -1134,8 +1134,7 @@ static const struct dmi_system_id dmi_dell[] = {
{ }
};
static int rt286_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt286_i2c_probe(struct i2c_client *i2c)
{
struct rt286_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt286_priv *rt286;
@ -1271,7 +1270,7 @@ static struct i2c_driver rt286_i2c_driver = {
.name = "rt286",
.acpi_match_table = ACPI_PTR(rt286_acpi_match),
},
.probe = rt286_i2c_probe,
.probe_new = rt286_i2c_probe,
.remove = rt286_i2c_remove,
.id_table = rt286_i2c_id,
};

View File

@ -1176,8 +1176,7 @@ static const struct dmi_system_id force_combo_jack_table[] = {
{ }
};
static int rt298_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt298_i2c_probe(struct i2c_client *i2c)
{
struct rt298_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt298_priv *rt298;
@ -1314,7 +1313,7 @@ static struct i2c_driver rt298_i2c_driver = {
.name = "rt298",
.acpi_match_table = ACPI_PTR(rt298_acpi_match),
},
.probe = rt298_i2c_probe,
.probe_new = rt298_i2c_probe,
.remove = rt298_i2c_remove,
.id_table = rt298_i2c_id,
};

View File

@ -1252,8 +1252,7 @@ static __maybe_unused int rt5514_i2c_resume(struct device *dev)
return 0;
}
static int rt5514_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5514_i2c_probe(struct i2c_client *i2c)
{
struct rt5514_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5514_priv *rt5514;
@ -1330,7 +1329,7 @@ static struct i2c_driver rt5514_i2c_driver = {
.of_match_table = of_match_ptr(rt5514_of_match),
.pm = &rt5514_i2_pm_ops,
},
.probe = rt5514_i2c_probe,
.probe_new = rt5514_i2c_probe,
.id_table = rt5514_i2c_id,
};
module_i2c_driver(rt5514_i2c_driver);

View File

@ -1337,8 +1337,7 @@ static const struct of_device_id rt5616_of_match[] = {
MODULE_DEVICE_TABLE(of, rt5616_of_match);
#endif
static int rt5616_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5616_i2c_probe(struct i2c_client *i2c)
{
struct rt5616_priv *rt5616;
unsigned int val;
@ -1408,7 +1407,7 @@ static struct i2c_driver rt5616_i2c_driver = {
.name = "rt5616",
.of_match_table = of_match_ptr(rt5616_of_match),
},
.probe = rt5616_i2c_probe,
.probe_new = rt5616_i2c_probe,
.remove = rt5616_i2c_remove,
.shutdown = rt5616_i2c_shutdown,
.id_table = rt5616_i2c_id,

View File

@ -1699,8 +1699,7 @@ static const struct regmap_config rt5631_regmap_config = {
.use_single_write = true,
};
static int rt5631_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5631_i2c_probe(struct i2c_client *i2c)
{
struct rt5631_priv *rt5631;
int ret;
@ -1732,7 +1731,7 @@ static struct i2c_driver rt5631_i2c_driver = {
.name = "rt5631",
.of_match_table = of_match_ptr(rt5631_i2c_dt_ids),
},
.probe = rt5631_i2c_probe,
.probe_new = rt5631_i2c_probe,
.remove = rt5631_i2c_remove,
.id_table = rt5631_i2c_id,
};

View File

@ -2927,8 +2927,7 @@ static int rt5640_parse_dt(struct rt5640_priv *rt5640, struct device_node *np)
return 0;
}
static int rt5640_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5640_i2c_probe(struct i2c_client *i2c)
{
struct rt5640_priv *rt5640;
int ret;
@ -3006,7 +3005,7 @@ static struct i2c_driver rt5640_i2c_driver = {
.acpi_match_table = ACPI_PTR(rt5640_acpi_match),
.of_match_table = of_match_ptr(rt5640_of_match),
},
.probe = rt5640_i2c_probe,
.probe_new = rt5640_i2c_probe,
.id_table = rt5640_i2c_id,
};
module_i2c_driver(rt5640_i2c_driver);

View File

@ -3855,8 +3855,7 @@ static int rt5645_parse_dt(struct rt5645_priv *rt5645, struct device *dev)
return 0;
}
static int rt5645_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5645_i2c_probe(struct i2c_client *i2c)
{
struct rt5645_platform_data *pdata = NULL;
const struct dmi_system_id *dmi_data;
@ -4183,7 +4182,7 @@ static struct i2c_driver rt5645_i2c_driver = {
.of_match_table = of_match_ptr(rt5645_of_match),
.acpi_match_table = ACPI_PTR(rt5645_acpi_match),
},
.probe = rt5645_i2c_probe,
.probe_new = rt5645_i2c_probe,
.remove = rt5645_i2c_remove,
.shutdown = rt5645_i2c_shutdown,
.id_table = rt5645_i2c_id,

View File

@ -2209,8 +2209,7 @@ MODULE_DEVICE_TABLE(i2c, rt5651_i2c_id);
* Note this function MUST not look at device-properties, see the comment
* above rt5651_apply_properties().
*/
static int rt5651_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5651_i2c_probe(struct i2c_client *i2c)
{
struct rt5651_priv *rt5651;
int ret;
@ -2281,7 +2280,7 @@ static struct i2c_driver rt5651_i2c_driver = {
.acpi_match_table = ACPI_PTR(rt5651_acpi_match),
.of_match_table = of_match_ptr(rt5651_of_match),
},
.probe = rt5651_i2c_probe,
.probe_new = rt5651_i2c_probe,
.id_table = rt5651_i2c_id,
};
module_i2c_driver(rt5651_i2c_driver);

View File

@ -4093,8 +4093,7 @@ static void rt5659_intel_hd_header_probe_setup(struct rt5659_priv *rt5659)
RT5659_IL_IRQ_MASK, RT5659_IL_IRQ_EN);
}
static int rt5659_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5659_i2c_probe(struct i2c_client *i2c)
{
struct rt5659_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5659_priv *rt5659;
@ -4342,7 +4341,7 @@ static struct i2c_driver rt5659_i2c_driver = {
.of_match_table = of_match_ptr(rt5659_of_match),
.acpi_match_table = ACPI_PTR(rt5659_acpi_match),
},
.probe = rt5659_i2c_probe,
.probe_new = rt5659_i2c_probe,
.shutdown = rt5659_i2c_shutdown,
.id_table = rt5659_i2c_id,
};

View File

@ -1266,8 +1266,7 @@ static int rt5660_parse_dt(struct rt5660_priv *rt5660, struct device *dev)
return 0;
}
static int rt5660_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5660_i2c_probe(struct i2c_client *i2c)
{
struct rt5660_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5660_priv *rt5660;
@ -1343,7 +1342,7 @@ static struct i2c_driver rt5660_i2c_driver = {
.acpi_match_table = ACPI_PTR(rt5660_acpi_match),
.of_match_table = of_match_ptr(rt5660_of_match),
},
.probe = rt5660_i2c_probe,
.probe_new = rt5660_i2c_probe,
.id_table = rt5660_i2c_id,
};
module_i2c_driver(rt5660_i2c_driver);

View File

@ -3490,8 +3490,7 @@ static int rt5663_parse_dp(struct rt5663_priv *rt5663, struct device *dev)
return 0;
}
static int rt5663_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5663_i2c_probe(struct i2c_client *i2c)
{
struct rt5663_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5663_priv *rt5663;
@ -3737,7 +3736,7 @@ static struct i2c_driver rt5663_i2c_driver = {
.acpi_match_table = ACPI_PTR(rt5663_acpi_match),
.of_match_table = of_match_ptr(rt5663_of_match),
},
.probe = rt5663_i2c_probe,
.probe_new = rt5663_i2c_probe,
.remove = rt5663_i2c_remove,
.shutdown = rt5663_i2c_shutdown,
.id_table = rt5663_i2c_id,

View File

@ -4757,8 +4757,7 @@ static void rt5665_calibrate_handler(struct work_struct *work)
rt5665_calibrate(rt5665);
}
static int rt5665_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5665_i2c_probe(struct i2c_client *i2c)
{
struct rt5665_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5665_priv *rt5665;
@ -4970,7 +4969,7 @@ static struct i2c_driver rt5665_i2c_driver = {
.of_match_table = of_match_ptr(rt5665_of_match),
.acpi_match_table = ACPI_PTR(rt5665_acpi_match),
},
.probe = rt5665_i2c_probe,
.probe_new = rt5665_i2c_probe,
.shutdown = rt5665_i2c_shutdown,
.id_table = rt5665_i2c_id,
};

View File

@ -2453,8 +2453,7 @@ static void rt5668_calibrate(struct rt5668_priv *rt5668)
}
static int rt5668_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5668_i2c_probe(struct i2c_client *i2c)
{
struct rt5668_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5668_priv *rt5668;
@ -2620,7 +2619,7 @@ static struct i2c_driver rt5668_i2c_driver = {
.of_match_table = of_match_ptr(rt5668_of_match),
.acpi_match_table = ACPI_PTR(rt5668_acpi_match),
},
.probe = rt5668_i2c_probe,
.probe_new = rt5668_i2c_probe,
.shutdown = rt5668_i2c_shutdown,
.id_table = rt5668_i2c_id,
};

View File

@ -3046,8 +3046,7 @@ const char *rt5670_components(void)
}
EXPORT_SYMBOL_GPL(rt5670_components);
static int rt5670_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5670_i2c_probe(struct i2c_client *i2c)
{
struct rt5670_priv *rt5670;
int ret;
@ -3334,7 +3333,7 @@ static struct i2c_driver rt5670_i2c_driver = {
.name = "rt5670",
.acpi_match_table = ACPI_PTR(rt5670_acpi_match),
},
.probe = rt5670_i2c_probe,
.probe_new = rt5670_i2c_probe,
.remove = rt5670_i2c_remove,
.id_table = rt5670_i2c_id,
};

View File

@ -118,8 +118,7 @@ static void rt5682_i2c_disable_regulators(void *data)
regulator_bulk_disable(ARRAY_SIZE(rt5682->supplies), rt5682->supplies);
}
static int rt5682_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5682_i2c_probe(struct i2c_client *i2c)
{
struct rt5682_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5682_priv *rt5682;
@ -335,7 +334,7 @@ static struct i2c_driver rt5682_i2c_driver = {
.acpi_match_table = rt5682_acpi_match,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.probe = rt5682_i2c_probe,
.probe_new = rt5682_i2c_probe,
.remove = rt5682_i2c_remove,
.shutdown = rt5682_i2c_shutdown,
.id_table = rt5682_i2c_id,

View File

@ -3036,8 +3036,7 @@ static void rt5682s_i2c_disable_regulators(void *data)
dev_err(dev, "Failed to disable supply MICVDD: %d\n", ret);
}
static int rt5682s_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
static int rt5682s_i2c_probe(struct i2c_client *i2c)
{
struct rt5682s_platform_data *pdata = dev_get_platdata(&i2c->dev);
struct rt5682s_priv *rt5682s;
@ -3228,7 +3227,7 @@ static struct i2c_driver rt5682s_i2c_driver = {
.acpi_match_table = rt5682s_acpi_match,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.probe = rt5682s_i2c_probe,
.probe_new = rt5682s_i2c_probe,
.remove = rt5682s_i2c_remove,
.shutdown = rt5682s_i2c_shutdown,
.id_table = rt5682s_i2c_id,