mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-15 19:25:13 +00:00
rtc: abx80x: switch to rtc_register_device
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
parent
f8033aabb2
commit
9360a6a818
1 changed files with 7 additions and 3 deletions
|
|
@ -614,12 +614,16 @@ static int abx80x_probe(struct i2c_client *client,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
rtc = devm_rtc_device_register(&client->dev, "abx8xx",
|
||||
&abx80x_rtc_ops, THIS_MODULE);
|
||||
|
||||
rtc = devm_rtc_allocate_device(&client->dev);
|
||||
if (IS_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);
|
||||
|
||||
if (client->irq > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue