| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 12 | 4 | */ |
|---|
| 13 | 5 | |
|---|
| 14 | 6 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 132 | 124 | |
|---|
| 133 | 125 | wktmr_read(timer, &now); |
|---|
| 134 | 126 | |
|---|
| 135 | | - rtc_time_to_tm(now.sec, tm); |
|---|
| 127 | + rtc_time64_to_tm(now.sec, tm); |
|---|
| 136 | 128 | |
|---|
| 137 | 129 | return 0; |
|---|
| 138 | 130 | } |
|---|
| .. | .. |
|---|
| 208 | 200 | { |
|---|
| 209 | 201 | struct device *dev = &pdev->dev; |
|---|
| 210 | 202 | struct brcmstb_waketmr *timer; |
|---|
| 211 | | - struct resource *res; |
|---|
| 212 | 203 | int ret; |
|---|
| 213 | 204 | |
|---|
| 214 | 205 | timer = devm_kzalloc(dev, sizeof(*timer), GFP_KERNEL); |
|---|
| .. | .. |
|---|
| 218 | 209 | platform_set_drvdata(pdev, timer); |
|---|
| 219 | 210 | timer->dev = dev; |
|---|
| 220 | 211 | |
|---|
| 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); |
|---|
| 223 | 213 | if (IS_ERR(timer->base)) |
|---|
| 224 | 214 | return PTR_ERR(timer->base); |
|---|
| 225 | 215 | |
|---|
| .. | .. |
|---|
| 263 | 253 | timer->rtc->range_max = U32_MAX; |
|---|
| 264 | 254 | |
|---|
| 265 | 255 | ret = rtc_register_device(timer->rtc); |
|---|
| 266 | | - if (ret) { |
|---|
| 267 | | - dev_err(dev, "unable to register device\n"); |
|---|
| 256 | + if (ret) |
|---|
| 268 | 257 | goto err_notifier; |
|---|
| 269 | | - } |
|---|
| 270 | 258 | |
|---|
| 271 | 259 | dev_info(dev, "registered, with irq %d\n", timer->irq); |
|---|
| 272 | 260 | |
|---|