diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-10-12 18:04:46 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-10-12 18:10:11 -0400 |
commit | 9360a6a81862d3acfeb44745d9db4f9861ba4159 (patch) | |
tree | 49d38757f63ad177e0143f0a0abd2088743c1c3d | |
parent | f8033aabb23bd8b2b51e2c32ee759f860ecdd1ee (diff) |
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>
-rw-r--r-- | drivers/rtc/rtc-abx80x.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-abx80x.c b/drivers/rtc/rtc-abx80x.c index fea9a60b06cf..442e62a3c9a9 100644 --- a/drivers/rtc/rtc-abx80x.c +++ b/drivers/rtc/rtc-abx80x.c | |||
@@ -614,12 +614,16 @@ static int abx80x_probe(struct i2c_client *client, | |||
614 | if (err) | 614 | if (err) |
615 | return err; | 615 | return err; |
616 | 616 | ||
617 | rtc = devm_rtc_device_register(&client->dev, "abx8xx", | 617 | rtc = devm_rtc_allocate_device(&client->dev); |
618 | &abx80x_rtc_ops, THIS_MODULE); | ||
619 | |||
620 | if (IS_ERR(rtc)) | 618 | if (IS_ERR(rtc)) |
621 | return PTR_ERR(rtc); | 619 | return PTR_ERR(rtc); |
622 | 620 | ||
621 | rtc->ops = &abx80x_rtc_ops; | ||
622 | |||
623 | err = rtc_register_device(rtc); | ||
624 | if (err) | ||
625 | return err; | ||
626 | |||
623 | i2c_set_clientdata(client, rtc); | 627 | i2c_set_clientdata(client, rtc); |
624 | 628 | ||
625 | if (client->irq > 0) { | 629 | if (client->irq > 0) { |