| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * DS1286 Real Time Clock interface for Linux |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * Copyright (C) 2008 Thomas Bogendoerfer |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Based on code written by Paul Gortmaker. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 10 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 11 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 12 | | - * option) any later version. |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | |
|---|
| 15 | 11 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 327 | 323 | static int ds1286_probe(struct platform_device *pdev) |
|---|
| 328 | 324 | { |
|---|
| 329 | 325 | struct rtc_device *rtc; |
|---|
| 330 | | - struct resource *res; |
|---|
| 331 | 326 | struct ds1286_priv *priv; |
|---|
| 332 | 327 | |
|---|
| 333 | 328 | priv = devm_kzalloc(&pdev->dev, sizeof(struct ds1286_priv), GFP_KERNEL); |
|---|
| 334 | 329 | if (!priv) |
|---|
| 335 | 330 | return -ENOMEM; |
|---|
| 336 | 331 | |
|---|
| 337 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 338 | | - priv->rtcregs = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 332 | + priv->rtcregs = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 339 | 333 | if (IS_ERR(priv->rtcregs)) |
|---|
| 340 | 334 | return PTR_ERR(priv->rtcregs); |
|---|
| 341 | 335 | |
|---|