diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-03-20 15:44:27 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-04 11:07:09 +0300 |
commit | 0b5e47bbaa5ea5a91c8bfc9249fcb34203c66390 (patch) | |
tree | 179d888bf104de4f06fe075ed912a8ab2bd5b95f /drivers/rtc/rtc-ps3.c | |
parent | e85b930bc6b7d39421556e57cad638651a9d6588 (diff) | |
download | linux-0b5e47bbaa5ea5a91c8bfc9249fcb34203c66390.tar.xz |
rtc: ps3: convert to devm_rtc_allocate_device
This allows further improvement of the driver.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ps3.c')
-rw-r--r-- | drivers/rtc/rtc-ps3.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c index 6c8ec805d2b2..446f5e23301a 100644 --- a/drivers/rtc/rtc-ps3.c +++ b/drivers/rtc/rtc-ps3.c @@ -47,13 +47,15 @@ static int __init ps3_rtc_probe(struct platform_device *dev) { struct rtc_device *rtc; - rtc = devm_rtc_device_register(&dev->dev, "rtc-ps3", &ps3_rtc_ops, - THIS_MODULE); + rtc = devm_rtc_allocate_device(&dev->dev); if (IS_ERR(rtc)) return PTR_ERR(rtc); + rtc->ops = &ps3_rtc_ops; + platform_set_drvdata(dev, rtc); - return 0; + + return rtc_register_device(rtc); } static struct platform_driver ps3_rtc_driver = { |