clk: use simple i2c probe function
Subsystems (2)
PATCH 1/1 clk: 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.
--- drivers/clk/clk-cdce706.c | 5 ++--- drivers/clk/clk-cs2000-cp.c | 5 ++--- drivers/clk/clk-max9485.c | 5 ++--- drivers/clk/clk-si514.c | 5 ++--- drivers/clk/clk-si5341.c | 5 ++--- 5 files changed, 10 insertions(+), 15 deletions(-)
drivers/clk/clk-cdce706.c +2 -3
@@ -627,8 +627,7 @@ of_clk_cdce_get(struct of_phandle_args *clkspec, void *data)return &cdce->clkout[idx].hw; } -static int cdce706_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cdce706_probe (struct i2c_client *client) {struct i2c_adapter *adapter = client->adapter;struct cdce706_dev_data *cdce;
@@ -692,7 +691,7 @@ static struct i2c_driver cdce706_i2c_driver = { .name = "cdce706", .of_match_table = of_match_ptr(cdce706_dt_match), }, - .probe = cdce706_probe, + .probe_new = cdce706_probe, .remove = cdce706_remove, .id_table = cdce706_id, };
drivers/clk/clk-cs2000-cp.c +2 -3
@@ -504,8 +504,7 @@ static int cs2000_remove(struct i2c_client *client)return 0 ; } -static int cs2000_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cs2000_probe (struct i2c_client *client) {struct cs2000_priv *priv;struct device *dev = &client->dev;
@@ -555,7 +554,7 @@ static struct i2c_driver cs2000_driver = { .pm = &cs2000_pm_ops, .of_match_table = cs2000_of_match, }, - .probe = cs2000_probe, + .probe_new = cs2000_probe, .remove = cs2000_remove, .id_table = cs2000_id, };
drivers/clk/clk-max9485.c +2 -3
@@ -254,8 +254,7 @@ max9485_of_clk_get(struct of_phandle_args *clkspec, void *data)return &drvdata->hw[idx].hw; } -static int max9485_i2c_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int max9485_i2c_probe (struct i2c_client *client) {struct max9485_driver_data *drvdata;struct device *dev = &client->dev;
@@ -377,7 +376,7 @@ static struct i2c_driver max9485_driver = { .pm = &max9485_pm_ops, .of_match_table = max9485_dt_ids, }, - .probe = max9485_i2c_probe, + .probe_new = max9485_i2c_probe, .id_table = max9485_i2c_ids, };module_i2c_driver (max9485_driver);
drivers/clk/clk-si514.c +2 -3
@@ -327,8 +327,7 @@ static const struct regmap_config si514_regmap_config = { .volatile_reg = si514_regmap_is_volatile, }; -static int si514_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int si514_probe (struct i2c_client *client) {struct clk_si514 *data;struct clk_init_data init;
@@ -394,7 +393,7 @@ static struct i2c_driver si514_driver = { .name = "si514", .of_match_table = clk_si514_of_match, }, - .probe = si514_probe, + .probe_new = si514_probe, .remove = si514_remove, .id_table = si514_id, };
drivers/clk/clk-si5341.c +2 -3
@@ -1545,8 +1545,7 @@ static const struct attribute *si5341_attributes[] = { NULL }; -static int si5341_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int si5341_probe (struct i2c_client *client) {struct clk_si5341 *data;struct clk_init_data init;
@@ -1835,7 +1834,7 @@ static struct i2c_driver si5341_driver = { .name = "si5341", .of_match_table = clk_si5341_of_match, }, - .probe = si5341_probe, + .probe_new = si5341_probe, .remove = si5341_remove, .id_table = si5341_id, };
base-commit: b47d5a4f6b8d42f8a8fbe891b36215e4fddc53be
Signature · 1 line
2.27.0
Quoted 7 lines · Stephen Kitt
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.
Quoted 8 lines
Signed-off-by Stephen Kitt <[email protected]>--- drivers/clk/clk-cdce706.c | 5 ++--- drivers/clk/clk-cs2000-cp.c | 5 ++--- drivers/clk/clk-max9485.c | 5 ++--- drivers/clk/clk-si514.c | 5 ++--- drivers/clk/clk-si5341.c | 5 ++--- 5 files changed, 10 insertions(+), 15 deletions(-)
Signature · 2 lines
Thanks. -- Max
Quoted 7 lines · Stephen Kitt
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 <[email protected]>
Looks good and builds fine: