hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rtc/rtc-brcmstb-waketimer.c
....@@ -1,14 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright © 2014-2017 Broadcom
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135
146 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -132,7 +124,7 @@
132124
133125 wktmr_read(timer, &now);
134126
135
- rtc_time_to_tm(now.sec, tm);
127
+ rtc_time64_to_tm(now.sec, tm);
136128
137129 return 0;
138130 }
....@@ -208,7 +200,6 @@
208200 {
209201 struct device *dev = &pdev->dev;
210202 struct brcmstb_waketmr *timer;
211
- struct resource *res;
212203 int ret;
213204
214205 timer = devm_kzalloc(dev, sizeof(*timer), GFP_KERNEL);
....@@ -218,8 +209,7 @@
218209 platform_set_drvdata(pdev, timer);
219210 timer->dev = dev;
220211
221
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
222
- timer->base = devm_ioremap_resource(dev, res);
212
+ timer->base = devm_platform_ioremap_resource(pdev, 0);
223213 if (IS_ERR(timer->base))
224214 return PTR_ERR(timer->base);
225215
....@@ -263,10 +253,8 @@
263253 timer->rtc->range_max = U32_MAX;
264254
265255 ret = rtc_register_device(timer->rtc);
266
- if (ret) {
267
- dev_err(dev, "unable to register device\n");
256
+ if (ret)
268257 goto err_notifier;
269
- }
270258
271259 dev_info(dev, "registered, with irq %d\n", timer->irq);
272260