hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/omap_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * omap_wdt.c
34 *
....@@ -6,10 +7,7 @@
67 * Author: MontaVista Software, Inc.
78 * <gdavis@mvista.com> or <source@mvista.com>
89 *
9
- * 2003 (c) MontaVista Software, Inc. This file is licensed under the
10
- * terms of the GNU General Public License version 2. This program is
11
- * licensed "as is" without any warranty of any kind, whether express
12
- * or implied.
10
+ * 2003 (c) MontaVista Software, Inc.
1311 *
1412 * History:
1513 *
....@@ -231,7 +229,6 @@
231229 static int omap_wdt_probe(struct platform_device *pdev)
232230 {
233231 struct omap_wd_timer_platform_data *pdata = dev_get_platdata(&pdev->dev);
234
- struct resource *res;
235232 struct omap_wdt_dev *wdev;
236233 int ret;
237234
....@@ -245,8 +242,7 @@
245242 mutex_init(&wdev->lock);
246243
247244 /* reserve static register mappings */
248
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
249
- wdev->base = devm_ioremap_resource(&pdev->dev, res);
245
+ wdev->base = devm_platform_ioremap_resource(pdev, 0);
250246 if (IS_ERR(wdev->base))
251247 return PTR_ERR(wdev->base);
252248
....@@ -281,6 +277,7 @@
281277
282278 ret = watchdog_register_device(&wdev->wdog);
283279 if (ret) {
280
+ pm_runtime_put(wdev->dev);
284281 pm_runtime_disable(wdev->dev);
285282 return ret;
286283 }