diff mbox series

[17/28] drivers: hsi: Call cpu_latency_qos_*() instead of pm_qos_*()

Message ID 5212477.aCSzomBNgy@kreacher (mailing list archive)
State Deferred
Headers show
Series PM: QoS: Get rid of unuseful code and rework CPU latency QoS interface | expand

Commit Message

Rafael J. Wysocki Feb. 11, 2020, 11:13 p.m. UTC
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

Call cpu_latency_qos_add/remove_request() and
cpu_latency_qos_request_active() instead of
pm_qos_add/remove_request() and pm_qos_request_active(),
respectively, because the latter are going to be dropped.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/hsi/clients/cmt_speech.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Sebastian Reichel Feb. 13, 2020, 9:06 p.m. UTC | #1
Hi,

On Wed, Feb 12, 2020 at 12:13:17AM +0100, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> 
> Call cpu_latency_qos_add/remove_request() and
> cpu_latency_qos_request_active() instead of
> pm_qos_add/remove_request() and pm_qos_request_active(),
> respectively, because the latter are going to be dropped.
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---

Acked-by: Sebastian Reichel <sre@kernel.org>

-- Sebastian

>  drivers/hsi/clients/cmt_speech.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
> index 9eec970cdfa5..89869c66fb9d 100644
> --- a/drivers/hsi/clients/cmt_speech.c
> +++ b/drivers/hsi/clients/cmt_speech.c
> @@ -965,14 +965,13 @@ static int cs_hsi_buf_config(struct cs_hsi_iface *hi,
>  
>  	if (old_state != hi->iface_state) {
>  		if (hi->iface_state == CS_STATE_CONFIGURED) {
> -			pm_qos_add_request(&hi->pm_qos_req,
> -				PM_QOS_CPU_DMA_LATENCY,
> +			cpu_latency_qos_add_request(&hi->pm_qos_req,
>  				CS_QOS_LATENCY_FOR_DATA_USEC);
>  			local_bh_disable();
>  			cs_hsi_read_on_data(hi);
>  			local_bh_enable();
>  		} else if (old_state == CS_STATE_CONFIGURED) {
> -			pm_qos_remove_request(&hi->pm_qos_req);
> +			cpu_latency_qos_remove_request(&hi->pm_qos_req);
>  		}
>  	}
>  	return r;
> @@ -1075,8 +1074,8 @@ static void cs_hsi_stop(struct cs_hsi_iface *hi)
>  	WARN_ON(!cs_state_idle(hi->control_state));
>  	WARN_ON(!cs_state_idle(hi->data_state));
>  
> -	if (pm_qos_request_active(&hi->pm_qos_req))
> -		pm_qos_remove_request(&hi->pm_qos_req);
> +	if (cpu_latency_qos_request_active(&hi->pm_qos_req))
> +		cpu_latency_qos_remove_request(&hi->pm_qos_req);
>  
>  	spin_lock_bh(&hi->lock);
>  	cs_hsi_free_data(hi);
> -- 
> 2.16.4
> 
> 
> 
> 
>
diff mbox series

Patch

diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
index 9eec970cdfa5..89869c66fb9d 100644
--- a/drivers/hsi/clients/cmt_speech.c
+++ b/drivers/hsi/clients/cmt_speech.c
@@ -965,14 +965,13 @@  static int cs_hsi_buf_config(struct cs_hsi_iface *hi,
 
 	if (old_state != hi->iface_state) {
 		if (hi->iface_state == CS_STATE_CONFIGURED) {
-			pm_qos_add_request(&hi->pm_qos_req,
-				PM_QOS_CPU_DMA_LATENCY,
+			cpu_latency_qos_add_request(&hi->pm_qos_req,
 				CS_QOS_LATENCY_FOR_DATA_USEC);
 			local_bh_disable();
 			cs_hsi_read_on_data(hi);
 			local_bh_enable();
 		} else if (old_state == CS_STATE_CONFIGURED) {
-			pm_qos_remove_request(&hi->pm_qos_req);
+			cpu_latency_qos_remove_request(&hi->pm_qos_req);
 		}
 	}
 	return r;
@@ -1075,8 +1074,8 @@  static void cs_hsi_stop(struct cs_hsi_iface *hi)
 	WARN_ON(!cs_state_idle(hi->control_state));
 	WARN_ON(!cs_state_idle(hi->data_state));
 
-	if (pm_qos_request_active(&hi->pm_qos_req))
-		pm_qos_remove_request(&hi->pm_qos_req);
+	if (cpu_latency_qos_request_active(&hi->pm_qos_req))
+		cpu_latency_qos_remove_request(&hi->pm_qos_req);
 
 	spin_lock_bh(&hi->lock);
 	cs_hsi_free_data(hi);