mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
clk: cdce925: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220407151831.2371706-3-steve@sk2.org
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
committed by
Stephen Boyd
parent
f9edf134d7
commit
df22168207
@@ -634,11 +634,20 @@ static struct regmap_bus regmap_cdce925_bus = {
|
||||
.read = cdce925_regmap_i2c_read,
|
||||
};
|
||||
|
||||
static int cdce925_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
static const struct i2c_device_id cdce925_id[] = {
|
||||
{ "cdce913", CDCE913 },
|
||||
{ "cdce925", CDCE925 },
|
||||
{ "cdce937", CDCE937 },
|
||||
{ "cdce949", CDCE949 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cdce925_id);
|
||||
|
||||
static int cdce925_probe(struct i2c_client *client)
|
||||
{
|
||||
struct clk_cdce925_chip *data;
|
||||
struct device_node *node = client->dev.of_node;
|
||||
const struct i2c_device_id *id = i2c_match_id(cdce925_id, client);
|
||||
const char *parent_name;
|
||||
const char *pll_clk_name[MAX_NUMBER_OF_PLLS] = {NULL,};
|
||||
struct clk_init_data init;
|
||||
@@ -814,15 +823,6 @@ error:
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id cdce925_id[] = {
|
||||
{ "cdce913", CDCE913 },
|
||||
{ "cdce925", CDCE925 },
|
||||
{ "cdce937", CDCE937 },
|
||||
{ "cdce949", CDCE949 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cdce925_id);
|
||||
|
||||
static const struct of_device_id clk_cdce925_of_match[] = {
|
||||
{ .compatible = "ti,cdce913" },
|
||||
{ .compatible = "ti,cdce925" },
|
||||
@@ -837,7 +837,7 @@ static struct i2c_driver cdce925_driver = {
|
||||
.name = "cdce925",
|
||||
.of_match_table = of_match_ptr(clk_cdce925_of_match),
|
||||
},
|
||||
.probe = cdce925_probe,
|
||||
.probe_new = cdce925_probe,
|
||||
.id_table = cdce925_id,
|
||||
};
|
||||
module_i2c_driver(cdce925_driver);
|
||||
|
||||
Reference in New Issue
Block a user