Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
authorIliyan Malchev <malchev@google.com>
Tue, 23 Nov 2010 21:58:43 +0000 (13:58 -0800)
committerIliyan Malchev <malchev@google.com>
Tue, 23 Nov 2010 21:58:43 +0000 (13:58 -0800)
Conflicts:
arch/arm/mach-tegra/tegra_spdif_audio.c

Signed-off-by: Iliyan Malchev <malchev@google.com>
1  2 
arch/arm/mach-tegra/tegra_spdif_audio.c

index faa53a24e219dc0b53a386ca035382952163935e,3fb90905bc87abe6876a116fcb9e4107355b5310..0848b1550dfe4426af95dd3b5755cc7ed9b6ef3b
  #include <linux/io.h>
  #include <linux/ktime.h>
  #include <linux/sysfs.h>
- #include <linux/pm_qos_params.h>
 +#include <linux/wakelock.h>
  #include <linux/delay.h>
  #include <linux/tegra_audio.h>
- #include <linux/workqueue.h>
  #include <linux/pm.h>
+ #include <linux/workqueue.h>
  
  #include <mach/dma.h>
  #include <mach/iomap.h>
@@@ -82,24 -80,11 +81,13 @@@ struct audio_stream 
        struct tegra_dma_channel *dma_chan;
        bool stop;
        struct completion stop_completion;
-       spinlock_t dma_req_lock; /* guards dma_has_it */
-       int dma_has_it;
-       struct tegra_dma_req dma_req;
+       spinlock_t dma_req_lock;
  
-       struct pm_qos_request_list pm_qos;
        struct work_struct allow_suspend_work;
 +      struct wake_lock wake_lock;
 +      char wake_lock_name[100];
  };
  
- struct spdif_pio_stats {
-       u32 spdif_interrupt_count;
-       u32 tx_fifo_errors;
-       u32 tx_fifo_written;
- };
  struct audio_driver_state {
        struct list_head next;
  
@@@ -167,18 -147,13 +150,15 @@@ static inline void prevent_suspend(stru
  {
        pr_debug("%s\n", __func__);
        cancel_work_sync(&as->allow_suspend_work);
-       pm_qos_update_request(&as->pm_qos, 0);
 +      wake_lock(&as->wake_lock);
  }
  
  static void allow_suspend_worker(struct work_struct *w)
  {
        struct audio_stream *as = container_of(w,
                        struct audio_stream, allow_suspend_work);
        pr_debug("%s\n", __func__);
-       pm_qos_update_request(&as->pm_qos, PM_QOS_DEFAULT_VALUE);
 +      wake_unlock(&as->wake_lock);
  }
  
  static inline void allow_suspend(struct audio_stream *as)
@@@ -1310,12 -1097,6 +1102,10 @@@ static int tegra_spdif_probe(struct pla
                return rc;
  
        INIT_WORK(&state->out.allow_suspend_work, allow_suspend_worker);
-       pm_qos_add_request(&state->out.pm_qos, PM_QOS_CPU_DMA_LATENCY,
-                               PM_QOS_DEFAULT_VALUE);
 +      snprintf(state->out.wake_lock_name, sizeof(state->out.wake_lock_name),
 +              "tegra-audio-spdif");
 +      wake_lock_init(&state->out.wake_lock, WAKE_LOCK_SUSPEND,
 +                      state->out.wake_lock_name);
  
        if (request_irq(state->irq, spdif_interrupt,
                        IRQF_DISABLED, state->pdev->name, state) < 0) {