diff mbox series

[32/51] PCI/portdrv: Switch to __pm_runtime_put_autosuspend()

Message ID 20241004094134.113895-1-sakari.ailus@linux.intel.com (mailing list archive)
State Handled Elsewhere
Headers show
Series treewide: Switch to __pm_runtime_put_autosuspend() | expand

Commit Message

Sakari Ailus Oct. 4, 2024, 9:41 a.m. UTC
pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/pci/pcie/portdrv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilpo Järvinen Oct. 4, 2024, 9:45 a.m. UTC | #1
On Fri, 4 Oct 2024, Sakari Ailus wrote:

> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/pci/pcie/portdrv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
> index 6af5e0425872..53f48065cc82 100644
> --- a/drivers/pci/pcie/portdrv.c
> +++ b/drivers/pci/pcie/portdrv.c
> @@ -711,7 +711,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
>  		pm_runtime_set_autosuspend_delay(&dev->dev, 100);
>  		pm_runtime_use_autosuspend(&dev->dev);
>  		pm_runtime_mark_last_busy(&dev->dev);
> -		pm_runtime_put_autosuspend(&dev->dev);
> +		__pm_runtime_put_autosuspend(&dev->dev);

Eh?

This call is preceeded by pm_runtime_mark_last_busy() so why all the 
extra churn when you really only want to remove that 
pm_runtime_mark_last_busy() call from above when it gets put inside the 
autosuspend call, no? Is extra last busy marking even dangerous so it 
could removed after the API change?
diff mbox series

Patch

diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
index 6af5e0425872..53f48065cc82 100644
--- a/drivers/pci/pcie/portdrv.c
+++ b/drivers/pci/pcie/portdrv.c
@@ -711,7 +711,7 @@  static int pcie_portdrv_probe(struct pci_dev *dev,
 		pm_runtime_set_autosuspend_delay(&dev->dev, 100);
 		pm_runtime_use_autosuspend(&dev->dev);
 		pm_runtime_mark_last_busy(&dev->dev);
-		pm_runtime_put_autosuspend(&dev->dev);
+		__pm_runtime_put_autosuspend(&dev->dev);
 		pm_runtime_allow(&dev->dev);
 	}