Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071847
Tested: This is one of a series of patch sets to enable Arm SystemReady IR
support in the kernel for compliant platforms. This set updates the
RTC drivers as needed in drivers/rtc. This set has been tested via
simple boot tests, and of course the CI loop.
commit 3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2
Author: Stephen Kitt <steve@sk2.org>
Date: Fri Jun 10 18:23:43 2022 +0200
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
(cherry picked from commit 3f4a3322477ccc13fc6a2b15c2f6a4d0376f5ff2)
Signed-off-by: Al Stone <ahs3@redhat.com>