.. | .. |
---|
1 | 1 | /* |
---|
2 | 2 | * vpif - Video Port Interface driver |
---|
3 | 3 | * VPIF is a receiver and transmitter for video data. It has two channels(0, 1) |
---|
4 | | - * that receiveing video byte stream and two channels(2, 3) for video output. |
---|
| 4 | + * that receiving video byte stream and two channels(2, 3) for video output. |
---|
5 | 5 | * The hardware supports SDTV, HDTV formats, raw data capture. |
---|
6 | 6 | * Currently, the driver supports NTSC and PAL standards. |
---|
7 | 7 | * |
---|
8 | | - * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ |
---|
| 8 | + * Copyright (C) 2009 Texas Instruments Incorporated - https://www.ti.com/ |
---|
9 | 9 | * |
---|
10 | 10 | * This program is free software; you can redistribute it and/or |
---|
11 | 11 | * modify it under the terms of the GNU General Public License as |
---|
.. | .. |
---|
428 | 428 | static struct resource *res, *res_irq; |
---|
429 | 429 | struct platform_device *pdev_capture, *pdev_display; |
---|
430 | 430 | struct device_node *endpoint = NULL; |
---|
| 431 | + int ret; |
---|
431 | 432 | |
---|
432 | 433 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
433 | 434 | vpif_base = devm_ioremap_resource(&pdev->dev, res); |
---|
.. | .. |
---|
458 | 459 | res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
---|
459 | 460 | if (!res_irq) { |
---|
460 | 461 | dev_warn(&pdev->dev, "Missing IRQ resource.\n"); |
---|
461 | | - return -EINVAL; |
---|
| 462 | + ret = -EINVAL; |
---|
| 463 | + goto err_put_rpm; |
---|
462 | 464 | } |
---|
463 | 465 | |
---|
464 | 466 | pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture), |
---|
.. | .. |
---|
492 | 494 | } |
---|
493 | 495 | |
---|
494 | 496 | return 0; |
---|
| 497 | + |
---|
| 498 | +err_put_rpm: |
---|
| 499 | + pm_runtime_put(&pdev->dev); |
---|
| 500 | + pm_runtime_disable(&pdev->dev); |
---|
| 501 | + |
---|
| 502 | + return ret; |
---|
495 | 503 | } |
---|
496 | 504 | |
---|
497 | 505 | static int vpif_remove(struct platform_device *pdev) |
---|
498 | 506 | { |
---|
| 507 | + pm_runtime_put(&pdev->dev); |
---|
499 | 508 | pm_runtime_disable(&pdev->dev); |
---|
500 | 509 | return 0; |
---|
501 | 510 | } |
---|