Commit 0b5e47bb authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: ps3: convert to devm_rtc_allocate_device

This allows further improvement of the driver.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent e85b930b
...@@ -47,13 +47,15 @@ static int __init ps3_rtc_probe(struct platform_device *dev) ...@@ -47,13 +47,15 @@ static int __init ps3_rtc_probe(struct platform_device *dev)
{ {
struct rtc_device *rtc; struct rtc_device *rtc;
rtc = devm_rtc_device_register(&dev->dev, "rtc-ps3", &ps3_rtc_ops, rtc = devm_rtc_allocate_device(&dev->dev);
THIS_MODULE);
if (IS_ERR(rtc)) if (IS_ERR(rtc))
return PTR_ERR(rtc); return PTR_ERR(rtc);
rtc->ops = &ps3_rtc_ops;
platform_set_drvdata(dev, rtc); platform_set_drvdata(dev, rtc);
return 0;
return rtc_register_device(rtc);
} }
static struct platform_driver ps3_rtc_driver = { static struct platform_driver ps3_rtc_driver = {
......
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