[PATCH 46/51] w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()

Sakari Ailus posted 51 patches 1 month, 3 weeks ago
Only 7 patches received!
[PATCH 46/51] w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
Posted by Sakari Ailus 1 month, 3 weeks ago
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/w1/masters/omap_hdq.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index d1cb5190445a..b7e87a3ef62d 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -446,7 +446,7 @@ static u8 omap_w1_triplet(void *_hdq, u8 bdir)
 	mutex_unlock(&hdq_data->hdq_mutex);
 rtn:
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return ret;
 }
@@ -467,7 +467,7 @@ static u8 omap_w1_reset_bus(void *_hdq)
 	omap_hdq_break(hdq_data);
 
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return 0;
 }
@@ -491,7 +491,7 @@ static u8 omap_w1_read_byte(void *_hdq)
 		val = -1;
 
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return val;
 }
@@ -526,7 +526,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte)
 
 out_err:
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 }
 
 static struct w1_bus_master omap_w1_master = {
@@ -626,7 +626,7 @@ static int omap_hdq_probe(struct platform_device *pdev)
 	omap_hdq_break(hdq_data);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	omap_w1_master.data = hdq_data;
 
-- 
2.39.5
Re: [PATCH 46/51] w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
Posted by Krzysztof Kozlowski 1 month, 3 weeks ago
On 04/10/2024 11:41, 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/w1/masters/omap_hdq.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
> index d1cb5190445a..b7e87a3ef62d 100644
> --- a/drivers/w1/masters/omap_hdq.c
> +++ b/drivers/w1/masters/omap_hdq.c
> @@ -446,7 +446,7 @@ static u8 omap_w1_triplet(void *_hdq, u8 bdir)
>  	mutex_unlock(&hdq_data->hdq_mutex);
>  rtn:
>  	pm_runtime_mark_last_busy(hdq_data->dev);
> -	pm_runtime_put_autosuspend(hdq_data->dev);
> +	__pm_runtime_put_autosuspend(hdq_data->dev);

So just make the switch by dropping pm_runtime_mark_last_busy(). This is
unnecessary churn.

Best regards,
Krzysztof