projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d1e5bf
)
rtc: pic32: convert to devm_rtc_allocate_device
author
Alexandre Belloni
<
[email protected]
>
Mon, 4 Mar 2019 10:16:30 +0000
(11:16 +0100)
committer
Alexandre Belloni
<
[email protected]
>
Mon, 4 Mar 2019 19:21:19 +0000
(20:21 +0100)
This allows further improvement of the driver.
Signed-off-by: Alexandre Belloni <
[email protected]
>
drivers/rtc/rtc-pic32.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-pic32.c
b/drivers/rtc/rtc-pic32.c
index d7ef0a6f8931a07f549388b925c67971b79fa4e3..43bd701daef244bdcf4aacaccf288b1b74dbc688 100644
(file)
--- a/
drivers/rtc/rtc-pic32.c
+++ b/
drivers/rtc/rtc-pic32.c
@@
-348,13
+348,15
@@
static int pic32_rtc_probe(struct platform_device *pdev)
device_init_wakeup(&pdev->dev, 1);
- pdata->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
- &pic32_rtcops,
- THIS_MODULE);
- if (IS_ERR(pdata->rtc)) {
- ret = PTR_ERR(pdata->rtc);
+ pdata->rtc = devm_rtc_allocate_device(&pdev->dev);
+ if (IS_ERR(pdata->rtc))
+ return PTR_ERR(pdata->rtc);
+
+ pdata->rtc->ops = &pic32_rtcops;
+
+ ret = rtc_register_device(pdata->rtc);
+ if (ret)
goto err_nortc;
- }
pdata->rtc->max_user_freq = 128;