.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * An rtc driver for the Dallas DS1511 |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
---|
5 | 6 | * Copyright (C) 2007 Andrew Sharp <andy.sharp@lsi.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License version 2 as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | 7 | * |
---|
11 | 8 | * Real time clock driver for the Dallas 1511 chip, which also |
---|
12 | 9 | * contains a watchdog timer. There is a tiny amount of code that |
---|
.. | .. |
---|
417 | 414 | |
---|
418 | 415 | static int ds1511_rtc_probe(struct platform_device *pdev) |
---|
419 | 416 | { |
---|
420 | | - struct resource *res; |
---|
421 | 417 | struct rtc_plat_data *pdata; |
---|
422 | 418 | int ret = 0; |
---|
423 | 419 | struct nvmem_config ds1511_nvmem_cfg = { |
---|
.. | .. |
---|
434 | 430 | if (!pdata) |
---|
435 | 431 | return -ENOMEM; |
---|
436 | 432 | |
---|
437 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
438 | | - ds1511_base = devm_ioremap_resource(&pdev->dev, res); |
---|
| 433 | + ds1511_base = devm_platform_ioremap_resource(pdev, 0); |
---|
439 | 434 | if (IS_ERR(ds1511_base)) |
---|
440 | 435 | return PTR_ERR(ds1511_base); |
---|
441 | 436 | pdata->ioaddr = ds1511_base; |
---|