diff options
author | Stephen Kitt <steve@sk2.org> | 2022-06-10 18:23:43 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2022-06-24 21:24:02 +0200 |
commit | 3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2 (patch) | |
tree | 0b7926b52ee89b56baff508d781d8b081f3cbfe5 /drivers/rtc/rtc-pcf85363.c | |
parent | rtc: Remove unused rtc_dev_exit(). (diff) | |
download | linux-3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2.tar.xz linux-3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2.zip |
rtc: use simple i2c probe
All these drivers have an i2c probe function which doesn't use the
"struct i2c_device_id *id" parameter, so they can trivially be
converted to the "probe_new" style of probe with a single argument.
This change was done using the following Coccinelle script, and fixed
up for whitespace changes:
@ rule1 @
identifier fn;
identifier client, id;
@@
- static int fn(struct i2c_client *client, const struct i2c_device_id *id)
+ static int fn(struct i2c_client *client)
{
...when != id
}
@ rule2 depends on rule1 @
identifier rule1.fn;
identifier driver;
@@
struct i2c_driver driver = {
- .probe
+ .probe_new
=
(
fn
|
- &fn
+ fn
)
,
};
Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220610162346.4134094-1-steve@sk2.org
Diffstat (limited to 'drivers/rtc/rtc-pcf85363.c')
-rw-r--r-- | drivers/rtc/rtc-pcf85363.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-pcf85363.c b/drivers/rtc/rtc-pcf85363.c index bb3e9ba75f6c..c05b722f0060 100644 --- a/drivers/rtc/rtc-pcf85363.c +++ b/drivers/rtc/rtc-pcf85363.c @@ -350,8 +350,7 @@ static const struct pcf85x63_config pcf_85363_config = { .num_nvram = 2 }; -static int pcf85363_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int pcf85363_probe(struct i2c_client *client) { struct pcf85363 *pcf85363; const struct pcf85x63_config *config = &pcf_85363_config; @@ -436,7 +435,7 @@ static struct i2c_driver pcf85363_driver = { .name = "pcf85363", .of_match_table = of_match_ptr(dev_ids), }, - .probe = pcf85363_probe, + .probe_new = pcf85363_probe, }; module_i2c_driver(pcf85363_driver); |