Re: [PATCH v3 25/79] staging: media: vde: use pm_runtime_resume_and_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



27.04.2021 13:26, Mauro Carvalho Chehab пишет:
> @@ -1088,8 +1090,9 @@ static int tegra_vde_remove(struct platform_device *pdev)
>  {
>  	struct tegra_vde *vde = platform_get_drvdata(pdev);
>  	struct device *dev = &pdev->dev;
> +	int ret;
>  
> -	pm_runtime_get_sync(dev);
> +	ret = pm_runtime_resume_and_get(dev);

Should be cleaner to return error directly here, IMO.

>  	pm_runtime_dont_use_autosuspend(dev);
>  	pm_runtime_disable(dev);
>  
> @@ -1097,7 +1100,8 @@ static int tegra_vde_remove(struct platform_device *pdev)
>  	 * Balance RPM state, the VDE power domain is left ON and hardware
>  	 * is clock-gated. It's safe to reboot machine now.
>  	 */
> -	pm_runtime_put_noidle(dev);
> +	if (ret >= 0)
> +		pm_runtime_put_noidle(dev);
>  	clk_disable_unprepare(vde->clk);

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux