.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * A RTC driver for the Simtek STK17TA8 |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Based on the DS1553 driver from |
---|
7 | 8 | * Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License version 2 as |
---|
11 | | - * published by the Free Software Foundation. |
---|
12 | 9 | */ |
---|
13 | 10 | |
---|
14 | 11 | #include <linux/bcd.h> |
---|
.. | .. |
---|
259 | 256 | |
---|
260 | 257 | static int stk17ta8_rtc_probe(struct platform_device *pdev) |
---|
261 | 258 | { |
---|
262 | | - struct resource *res; |
---|
263 | 259 | unsigned int cal; |
---|
264 | 260 | unsigned int flags; |
---|
265 | 261 | struct rtc_plat_data *pdata; |
---|
.. | .. |
---|
278 | 274 | if (!pdata) |
---|
279 | 275 | return -ENOMEM; |
---|
280 | 276 | |
---|
281 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
282 | | - ioaddr = devm_ioremap_resource(&pdev->dev, res); |
---|
| 277 | + ioaddr = devm_platform_ioremap_resource(pdev, 0); |
---|
283 | 278 | if (IS_ERR(ioaddr)) |
---|
284 | 279 | return PTR_ERR(ioaddr); |
---|
285 | 280 | pdata->ioaddr = ioaddr; |
---|