aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ab-b5ze-s3.c
diff options
context:
space:
mode:
authorStephen Kitt <steve@sk2.org>2022-06-10 18:23:43 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2022-06-24 21:24:02 +0200
commit3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2 (patch)
tree0b7926b52ee89b56baff508d781d8b081f3cbfe5 /drivers/rtc/rtc-ab-b5ze-s3.c
parent33740c7f94f948767578e852e6f256038a56803d (diff)
downloadlinux-3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2.tar.gz
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-ab-b5ze-s3.c')
-rw-r--r--drivers/rtc/rtc-ab-b5ze-s3.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c
index 6e3e320dc727d..f2b0971d2c65d 100644
--- a/drivers/rtc/rtc-ab-b5ze-s3.c
+++ b/drivers/rtc/rtc-ab-b5ze-s3.c
@@ -817,8 +817,7 @@ static const struct regmap_config abb5zes3_rtc_regmap_config = {
.val_bits = 8,
};
-static int abb5zes3_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int abb5zes3_probe(struct i2c_client *client)
{
struct abb5zes3_rtc_data *data = NULL;
struct device *dev = &client->dev;
@@ -945,7 +944,7 @@ static struct i2c_driver abb5zes3_driver = {
.pm = &abb5zes3_rtc_pm_ops,
.of_match_table = of_match_ptr(abb5zes3_dt_match),
},
- .probe = abb5zes3_probe,
+ .probe_new = abb5zes3_probe,
.id_table = abb5zes3_id,
};
module_i2c_driver(abb5zes3_driver);