rtc: rx8010: switch to using the preferred i2c API

We should generally use probe_new instead of probe when registering i2c
drivers. Convert rx8010 to using it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200914154601.32245-13-brgl@bgdev.pl
This commit is contained in:
Bartosz Golaszewski 2020-09-14 17:45:59 +02:00 committed by Alexandre Belloni
parent 0ce627785a
commit cee015d90d
1 changed files with 2 additions and 3 deletions

View File

@ -414,8 +414,7 @@ static const struct rtc_class_ops rx8010_rtc_ops_alarm = {
.alarm_irq_enable = rx8010_alarm_irq_enable, .alarm_irq_enable = rx8010_alarm_irq_enable,
}; };
static int rx8010_probe(struct i2c_client *client, static int rx8010_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct i2c_adapter *adapter = client->adapter; struct i2c_adapter *adapter = client->adapter;
struct device *dev = &client->dev; struct device *dev = &client->dev;
@ -469,7 +468,7 @@ static struct i2c_driver rx8010_driver = {
.name = "rtc-rx8010", .name = "rtc-rx8010",
.of_match_table = of_match_ptr(rx8010_of_match), .of_match_table = of_match_ptr(rx8010_of_match),
}, },
.probe = rx8010_probe, .probe_new = rx8010_probe,
.id_table = rx8010_id, .id_table = rx8010_id,
}; };