hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/s3c2410_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2004 Simtec Electronics
34 * Ben Dooks <ben@simtec.co.uk>
....@@ -6,16 +7,6 @@
67 *
78 * Based on, softdog.c by Alan Cox,
89 * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
1910 */
2011
2112 #include <linux/module.h>
....@@ -522,7 +513,6 @@
522513 {
523514 struct device *dev = &pdev->dev;
524515 struct s3c2410_wdt *wdt;
525
- struct resource *wdt_mem;
526516 struct resource *wdt_irq;
527517 unsigned int wtcon;
528518 int started = 0;
....@@ -554,8 +544,7 @@
554544 }
555545
556546 /* get the memory region for the watchdog timer */
557
- wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
558
- wdt->reg_base = devm_ioremap_resource(dev, wdt_mem);
547
+ wdt->reg_base = devm_platform_ioremap_resource(pdev, 0);
559548 if (IS_ERR(wdt->reg_base)) {
560549 ret = PTR_ERR(wdt->reg_base);
561550 goto err;
....@@ -617,10 +606,8 @@
617606 wdt->wdt_device.parent = dev;
618607
619608 ret = watchdog_register_device(&wdt->wdt_device);
620
- if (ret) {
621
- dev_err(dev, "cannot register watchdog (%d)\n", ret);
609
+ if (ret)
622610 goto err_cpufreq;
623
- }
624611
625612 ret = s3c2410wdt_mask_and_disable_reset(wdt, false);
626613 if (ret < 0)