.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2004 Simtec Electronics |
---|
3 | 4 | * Ben Dooks <ben@simtec.co.uk> |
---|
.. | .. |
---|
6 | 7 | * |
---|
7 | 8 | * Based on, softdog.c by Alan Cox, |
---|
8 | 9 | * (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. |
---|
19 | 10 | */ |
---|
20 | 11 | |
---|
21 | 12 | #include <linux/module.h> |
---|
.. | .. |
---|
522 | 513 | { |
---|
523 | 514 | struct device *dev = &pdev->dev; |
---|
524 | 515 | struct s3c2410_wdt *wdt; |
---|
525 | | - struct resource *wdt_mem; |
---|
526 | 516 | struct resource *wdt_irq; |
---|
527 | 517 | unsigned int wtcon; |
---|
528 | 518 | int started = 0; |
---|
.. | .. |
---|
554 | 544 | } |
---|
555 | 545 | |
---|
556 | 546 | /* 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); |
---|
559 | 548 | if (IS_ERR(wdt->reg_base)) { |
---|
560 | 549 | ret = PTR_ERR(wdt->reg_base); |
---|
561 | 550 | goto err; |
---|
.. | .. |
---|
617 | 606 | wdt->wdt_device.parent = dev; |
---|
618 | 607 | |
---|
619 | 608 | ret = watchdog_register_device(&wdt->wdt_device); |
---|
620 | | - if (ret) { |
---|
621 | | - dev_err(dev, "cannot register watchdog (%d)\n", ret); |
---|
| 609 | + if (ret) |
---|
622 | 610 | goto err_cpufreq; |
---|
623 | | - } |
---|
624 | 611 | |
---|
625 | 612 | ret = s3c2410wdt_mask_and_disable_reset(wdt, false); |
---|
626 | 613 | if (ret < 0) |
---|