.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * omap_wdt.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Author: MontaVista Software, Inc. |
---|
7 | 8 | * <gdavis@mvista.com> or <source@mvista.com> |
---|
8 | 9 | * |
---|
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. |
---|
13 | 11 | * |
---|
14 | 12 | * History: |
---|
15 | 13 | * |
---|
.. | .. |
---|
231 | 229 | static int omap_wdt_probe(struct platform_device *pdev) |
---|
232 | 230 | { |
---|
233 | 231 | struct omap_wd_timer_platform_data *pdata = dev_get_platdata(&pdev->dev); |
---|
234 | | - struct resource *res; |
---|
235 | 232 | struct omap_wdt_dev *wdev; |
---|
236 | 233 | int ret; |
---|
237 | 234 | |
---|
.. | .. |
---|
245 | 242 | mutex_init(&wdev->lock); |
---|
246 | 243 | |
---|
247 | 244 | /* 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); |
---|
250 | 246 | if (IS_ERR(wdev->base)) |
---|
251 | 247 | return PTR_ERR(wdev->base); |
---|
252 | 248 | |
---|
.. | .. |
---|
281 | 277 | |
---|
282 | 278 | ret = watchdog_register_device(&wdev->wdog); |
---|
283 | 279 | if (ret) { |
---|
| 280 | + pm_runtime_put(wdev->dev); |
---|
284 | 281 | pm_runtime_disable(wdev->dev); |
---|
285 | 282 | return ret; |
---|
286 | 283 | } |
---|