Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: ps3: convert to devm_rtc_allocate_device

This allows further improvement of the driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+5 -3
+5 -3
drivers/rtc/rtc-ps3.c
··· 47 47 { 48 48 struct rtc_device *rtc; 49 49 50 - rtc = devm_rtc_device_register(&dev->dev, "rtc-ps3", &ps3_rtc_ops, 51 - THIS_MODULE); 50 + rtc = devm_rtc_allocate_device(&dev->dev); 52 51 if (IS_ERR(rtc)) 53 52 return PTR_ERR(rtc); 54 53 54 + rtc->ops = &ps3_rtc_ops; 55 + 55 56 platform_set_drvdata(dev, rtc); 56 - return 0; 57 + 58 + return rtc_register_device(rtc); 57 59 } 58 60 59 61 static struct platform_driver ps3_rtc_driver = {