RE: [PATCH 1/1] media: ipu3-cio2: Fix PM runtime usage_count in driver unbind

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

 



Reviewed-by: Bingbu Cao <bingbu.cao@xxxxxxxxx>

________________________
BRs,  
Intel VTG - Linux & Chrome IPU SW
Bingbu Cao 

> -----Original Message-----
> From: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> Sent: Wednesday, February 1, 2023 21:38
> To: linux-media@xxxxxxxxxxxxxxx
> Cc: Cao, Bingbu <bingbu.cao@xxxxxxxxx>
> Subject: [PATCH 1/1] media: ipu3-cio2: Fix PM runtime usage_count in driver
> unbind
> 
> Get the PM runtime usage_count and forbid PM runtime at driver unbind. The
> opposite is being done in probe() already.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> ---
>  drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
> b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
> index 390bd5ea3472..3b76a9d0383a 100644
> --- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
> +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
> @@ -1843,6 +1843,9 @@ static void cio2_pci_remove(struct pci_dev *pci_dev)
>  	v4l2_device_unregister(&cio2->v4l2_dev);
>  	media_device_cleanup(&cio2->media_dev);
>  	mutex_destroy(&cio2->lock);
> +
> +	pm_runtime_forbid(&pci_dev->dev);
> +	pm_runtime_get_noresume(&pci_dev->dev);
>  }
> 
>  static int __maybe_unused cio2_runtime_suspend(struct device *dev)
> --
> 2.30.2





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux