Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6.git] / sound / core / pcm_native.c
index 20b5982..192dd40 100644 (file)
@@ -484,11 +484,13 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
        snd_pcm_timer_resolution_change(substream);
        runtime->status->state = SNDRV_PCM_STATE_SETUP;
 
-       pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
-                               substream->latency_id);
+       if (substream->latency_pm_qos_req) {
+               pm_qos_remove_request(substream->latency_pm_qos_req);
+               substream->latency_pm_qos_req = NULL;
+       }
        if ((usecs = period_to_usecs(runtime)) >= 0)
-               pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY,
-                                       substream->latency_id, usecs);
+               substream->latency_pm_qos_req = pm_qos_add_request(
+                                       PM_QOS_CPU_DMA_LATENCY, usecs);
        return 0;
  _error:
        /* hardware might be unuseable from this time,
@@ -543,8 +545,8 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
        if (substream->ops->hw_free)
                result = substream->ops->hw_free(substream);
        runtime->status->state = SNDRV_PCM_STATE_OPEN;
-       pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
-               substream->latency_id);
+       pm_qos_remove_request(substream->latency_pm_qos_req);
+       substream->latency_pm_qos_req = NULL;
        return result;
 }