hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/rtc/rtc-ds1511.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * An rtc driver for the Dallas DS1511
34 *
45 * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
56 * 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.
107 *
118 * Real time clock driver for the Dallas 1511 chip, which also
129 * contains a watchdog timer. There is a tiny amount of code that
....@@ -417,7 +414,6 @@
417414
418415 static int ds1511_rtc_probe(struct platform_device *pdev)
419416 {
420
- struct resource *res;
421417 struct rtc_plat_data *pdata;
422418 int ret = 0;
423419 struct nvmem_config ds1511_nvmem_cfg = {
....@@ -434,8 +430,7 @@
434430 if (!pdata)
435431 return -ENOMEM;
436432
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);
439434 if (IS_ERR(ds1511_base))
440435 return PTR_ERR(ds1511_base);
441436 pdata->ioaddr = ds1511_base;