Commit 9360a6a8 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: abx80x: switch to rtc_register_device

This allows for future improvement of the driver.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent f8033aab
...@@ -614,12 +614,16 @@ static int abx80x_probe(struct i2c_client *client, ...@@ -614,12 +614,16 @@ static int abx80x_probe(struct i2c_client *client,
if (err) if (err)
return err; return err;
rtc = devm_rtc_device_register(&client->dev, "abx8xx", rtc = devm_rtc_allocate_device(&client->dev);
&abx80x_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) if (IS_ERR(rtc))
return PTR_ERR(rtc); return PTR_ERR(rtc);
rtc->ops = &abx80x_rtc_ops;
err = rtc_register_device(rtc);
if (err)
return err;
i2c_set_clientdata(client, rtc); i2c_set_clientdata(client, rtc);
if (client->irq > 0) { if (client->irq > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment