diff options
author | Colin Cross <ccross@android.com> | 2010-10-05 21:59:08 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-21 22:11:40 -0700 |
commit | b49e7f85e0fed3578933c956a49225c73d8cf1a8 (patch) | |
tree | c12d73f6fe01948916f085d2c17150489f8f7ecf /arch/arm/mach-tegra/tegra_i2s_audio.c | |
parent | e52cc5f1dc42b99419ce188d2068cd5d4fd2561e (diff) |
[ARM] tegra: i2s: Update pm_qos for 2.6.36
Change-Id: I205457db1432c672b026887defa8d498bc613412
Signed-off-by: Colin Cross <ccross@android.com>
Rebase-Id: R1e102337297aa2873ed38f023e853002403c0a1a
Diffstat (limited to 'arch/arm/mach-tegra/tegra_i2s_audio.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra_i2s_audio.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/arch/arm/mach-tegra/tegra_i2s_audio.c b/arch/arm/mach-tegra/tegra_i2s_audio.c index b1344fc67ddc..a70f769b61cf 100644 --- a/arch/arm/mach-tegra/tegra_i2s_audio.c +++ b/arch/arm/mach-tegra/tegra_i2s_audio.c @@ -83,7 +83,7 @@ struct audio_stream { int dma_has_it; struct tegra_dma_req dma_req; - struct pm_qos_request_list *pm_qos; + struct pm_qos_request_list pm_qos; }; struct i2s_pio_stats { @@ -531,7 +531,7 @@ static int start_playback(struct audio_stream *aos) rc = sound_ops->start_playback(aos); spin_unlock_irqrestore(&aos->dma_req_lock, flags); if (!rc) - pm_qos_update_request(aos->pm_qos, 0); + pm_qos_update_request(&aos->pm_qos, 0); return rc; } @@ -548,7 +548,7 @@ static int start_recording_if_necessary(struct audio_stream *ais) } spin_unlock_irqrestore(&ais->dma_req_lock, flags); if (!rc) - pm_qos_update_request(ais->pm_qos, 0); + pm_qos_update_request(&ais->pm_qos, 0); return rc; } @@ -561,7 +561,7 @@ static bool stop_playback_if_necessary(struct audio_stream *aos) if (aos->active) aos->errors.full_empty++; /* underflow */ spin_unlock_irqrestore(&aos->dma_req_lock, flags); - pm_qos_update_request(aos->pm_qos, PM_QOS_DEFAULT_VALUE); + pm_qos_update_request(&aos->pm_qos, PM_QOS_DEFAULT_VALUE); return true; } spin_unlock_irqrestore(&aos->dma_req_lock, flags); @@ -590,7 +590,7 @@ static bool stop_recording(struct audio_stream *ais) rc = wait_for_completion_interruptible( &ais->stop_completion); pr_debug("%s: done: %d\n", __func__, rc); - pm_qos_update_request(ais->pm_qos, PM_QOS_DEFAULT_VALUE); + pm_qos_update_request(&ais->pm_qos, PM_QOS_DEFAULT_VALUE); return true; } @@ -2050,7 +2050,7 @@ static int tegra_audio_probe(struct platform_device *pdev) pr_info("%s\n", __func__); - state = kmalloc(sizeof(*state), GFP_KERNEL); + state = kzalloc(sizeof(*state), GFP_KERNEL); if (!state) return -ENOMEM; @@ -2184,23 +2184,10 @@ static int tegra_audio_probe(struct platform_device *pdev) if (rc < 0) return rc; - state->in.pm_qos = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY, + pm_qos_add_request(&state->in.pm_qos, PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE); - if (!state->in.pm_qos) { - dev_err(&pdev->dev, - "%s: could not register pm_qos handle for input\n", - __func__); - return -EIO; - } - - state->out.pm_qos = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY, + pm_qos_add_request(&state->out.pm_qos, PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE); - if (!state->out.pm_qos) { - dev_err(&pdev->dev, - "%s: could not register pm_qos handle for output\n", - __func__); - return -EIO; - } if (request_irq(state->irq, i2s_interrupt, IRQF_DISABLED, state->pdev->name, state) < 0) { |