| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * An rtc driver for the Dallas DS1553 |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #include <linux/bcd.h> |
|---|
| .. | .. |
|---|
| 252 | 249 | |
|---|
| 253 | 250 | static int ds1553_rtc_probe(struct platform_device *pdev) |
|---|
| 254 | 251 | { |
|---|
| 255 | | - struct resource *res; |
|---|
| 256 | 252 | unsigned int cen, sec; |
|---|
| 257 | 253 | struct rtc_plat_data *pdata; |
|---|
| 258 | 254 | void __iomem *ioaddr; |
|---|
| .. | .. |
|---|
| 271 | 267 | if (!pdata) |
|---|
| 272 | 268 | return -ENOMEM; |
|---|
| 273 | 269 | |
|---|
| 274 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 275 | | - ioaddr = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 270 | + ioaddr = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 276 | 271 | if (IS_ERR(ioaddr)) |
|---|
| 277 | 272 | return PTR_ERR(ioaddr); |
|---|
| 278 | 273 | pdata->ioaddr = ioaddr; |
|---|