aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2009-10-22 05:03:54 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 15:23:10 -0500
commitace9e7915badc44d0240b12ca9817b0171623f29 (patch)
tree2ad5506d603006fa40e79eb5b4c74e0b583e362e /drivers
parent05d42522017df477f16c0ebc2d65aa8bde6e0e86 (diff)
Staging: dream: remove wakelock support
Includes changed so that <linux/sched.h> is now needed for TASK_INTERRUPTIBLE and friends, so include it. Remove hooks for features not in mainline, such as earlysuspend and wakelocks. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/dream/camera/msm_camera.c7
-rw-r--r--drivers/staging/dream/camera/msm_vfe7x.c1
-rw-r--r--drivers/staging/dream/gpio_event.c3
-rw-r--r--drivers/staging/dream/gpio_input.c7
-rw-r--r--drivers/staging/dream/gpio_matrix.c8
-rw-r--r--drivers/staging/dream/qdsp5/adsp.c5
-rw-r--r--drivers/staging/dream/qdsp5/audio_out.c4
-rw-r--r--drivers/staging/dream/smd/smd_qmi.c5
-rw-r--r--drivers/staging/dream/smd/smd_rpcrouter.c12
-rw-r--r--drivers/staging/dream/smd/smd_tty.c5
10 files changed, 3 insertions, 54 deletions
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c
index 88165998698..7d938772eac 100644
--- a/drivers/staging/dream/camera/msm_camera.c
+++ b/drivers/staging/dream/camera/msm_camera.c
@@ -13,6 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/sched.h>
16#include <mach/board.h> 17#include <mach/board.h>
17 18
18#include <linux/fs.h> 19#include <linux/fs.h>
@@ -1597,7 +1598,6 @@ static int __msm_release(struct msm_sync *sync)
1597 MSM_DRAIN_QUEUE(sync, pict_frame_q); 1598 MSM_DRAIN_QUEUE(sync, pict_frame_q);
1598 1599
1599 sync->sctrl.s_release(); 1600 sync->sctrl.s_release();
1600 wake_unlock(&sync->wake_lock);
1601 1601
1602 sync->apps_id = NULL; 1602 sync->apps_id = NULL;
1603 CDBG("msm_release completed!\n"); 1603 CDBG("msm_release completed!\n");
@@ -1806,7 +1806,6 @@ static int __msm_open(struct msm_sync *sync, const char *const apps_id)
1806 sync->apps_id = apps_id; 1806 sync->apps_id = apps_id;
1807 1807
1808 if (!sync->opencnt) { 1808 if (!sync->opencnt) {
1809 wake_lock(&sync->wake_lock);
1810 1809
1811 msm_camvfe_fn_init(&sync->vfefn, sync); 1810 msm_camvfe_fn_init(&sync->vfefn, sync);
1812 if (sync->vfefn.vfe_init) { 1811 if (sync->vfefn.vfe_init) {
@@ -2044,8 +2043,6 @@ static int msm_sync_init(struct msm_sync *sync,
2044 INIT_LIST_HEAD(&sync->pict_frame_q); 2043 INIT_LIST_HEAD(&sync->pict_frame_q);
2045 init_waitqueue_head(&sync->pict_frame_wait); 2044 init_waitqueue_head(&sync->pict_frame_wait);
2046 2045
2047 wake_lock_init(&sync->wake_lock, WAKE_LOCK_IDLE, "msm_camera");
2048
2049 rc = msm_camio_probe_on(pdev); 2046 rc = msm_camio_probe_on(pdev);
2050 if (rc < 0) 2047 if (rc < 0)
2051 return rc; 2048 return rc;
@@ -2058,7 +2055,6 @@ static int msm_sync_init(struct msm_sync *sync,
2058 if (rc < 0) { 2055 if (rc < 0) {
2059 pr_err("msm_camera: failed to initialize %s\n", 2056 pr_err("msm_camera: failed to initialize %s\n",
2060 sync->sdata->sensor_name); 2057 sync->sdata->sensor_name);
2061 wake_lock_destroy(&sync->wake_lock);
2062 return rc; 2058 return rc;
2063 } 2059 }
2064 2060
@@ -2070,7 +2066,6 @@ static int msm_sync_init(struct msm_sync *sync,
2070 2066
2071static int msm_sync_destroy(struct msm_sync *sync) 2067static int msm_sync_destroy(struct msm_sync *sync)
2072{ 2068{
2073 wake_lock_destroy(&sync->wake_lock);
2074 return 0; 2069 return 0;
2075} 2070}
2076 2071
diff --git a/drivers/staging/dream/camera/msm_vfe7x.c b/drivers/staging/dream/camera/msm_vfe7x.c
index 5de96c5d635..33ab3ac6ac5 100644
--- a/drivers/staging/dream/camera/msm_vfe7x.c
+++ b/drivers/staging/dream/camera/msm_vfe7x.c
@@ -5,6 +5,7 @@
5#include <linux/msm_adsp.h> 5#include <linux/msm_adsp.h>
6#include <linux/uaccess.h> 6#include <linux/uaccess.h>
7#include <linux/fs.h> 7#include <linux/fs.h>
8#include <linux/sched.h>
8#include <linux/android_pmem.h> 9#include <linux/android_pmem.h>
9#include <mach/msm_adsp.h> 10#include <mach/msm_adsp.h>
10#include <linux/delay.h> 11#include <linux/delay.h>
diff --git a/drivers/staging/dream/gpio_event.c b/drivers/staging/dream/gpio_event.c
index 8b64c1e579b..e60e2c0db9c 100644
--- a/drivers/staging/dream/gpio_event.c
+++ b/drivers/staging/dream/gpio_event.c
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/earlysuspend.h> 16
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/input.h> 18#include <linux/input.h>
19#include <linux/gpio_event.h> 19#include <linux/gpio_event.h>
@@ -23,7 +23,6 @@
23struct gpio_event { 23struct gpio_event {
24 struct input_dev *input_dev; 24 struct input_dev *input_dev;
25 const struct gpio_event_platform_data *info; 25 const struct gpio_event_platform_data *info;
26 struct early_suspend early_suspend;
27 void *state[0]; 26 void *state[0];
28}; 27};
29 28
diff --git a/drivers/staging/dream/gpio_input.c b/drivers/staging/dream/gpio_input.c
index 7e307f267a2..0638ec43601 100644
--- a/drivers/staging/dream/gpio_input.c
+++ b/drivers/staging/dream/gpio_input.c
@@ -19,7 +19,6 @@
19#include <linux/hrtimer.h> 19#include <linux/hrtimer.h>
20#include <linux/input.h> 20#include <linux/input.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/wakelock.h>
23 22
24enum { 23enum {
25 DEBOUNCE_UNSTABLE = BIT(0), /* Got irq, while debouncing */ 24 DEBOUNCE_UNSTABLE = BIT(0), /* Got irq, while debouncing */
@@ -44,7 +43,6 @@ struct gpio_input_state {
44 int use_irq; 43 int use_irq;
45 int debounce_count; 44 int debounce_count;
46 spinlock_t irq_lock; 45 spinlock_t irq_lock;
47 struct wake_lock wake_lock;
48 struct gpio_key_state key_state[0]; 46 struct gpio_key_state key_state[0];
49}; 47};
50 48
@@ -143,8 +141,6 @@ static enum hrtimer_restart gpio_event_input_timer_func(struct hrtimer *timer)
143 hrtimer_start(timer, ds->info->debounce_time, HRTIMER_MODE_REL); 141 hrtimer_start(timer, ds->info->debounce_time, HRTIMER_MODE_REL);
144 else if (!ds->use_irq) 142 else if (!ds->use_irq)
145 hrtimer_start(timer, ds->info->poll_time, HRTIMER_MODE_REL); 143 hrtimer_start(timer, ds->info->poll_time, HRTIMER_MODE_REL);
146 else
147 wake_unlock(&ds->wake_lock);
148 144
149 spin_unlock_irqrestore(&ds->irq_lock, irqflags); 145 spin_unlock_irqrestore(&ds->irq_lock, irqflags);
150 146
@@ -170,7 +166,6 @@ static irqreturn_t gpio_event_input_irq_handler(int irq, void *dev_id)
170 if (ks->debounce & DEBOUNCE_WAIT_IRQ) { 166 if (ks->debounce & DEBOUNCE_WAIT_IRQ) {
171 ks->debounce = DEBOUNCE_UNKNOWN; 167 ks->debounce = DEBOUNCE_UNKNOWN;
172 if (ds->debounce_count++ == 0) { 168 if (ds->debounce_count++ == 0) {
173 wake_lock(&ds->wake_lock);
174 hrtimer_start( 169 hrtimer_start(
175 &ds->timer, ds->info->debounce_time, 170 &ds->timer, ds->info->debounce_time,
176 HRTIMER_MODE_REL); 171 HRTIMER_MODE_REL);
@@ -277,7 +272,6 @@ int gpio_event_input_func(struct input_dev *input_dev,
277 ds->debounce_count = di->keymap_size; 272 ds->debounce_count = di->keymap_size;
278 ds->input_dev = input_dev; 273 ds->input_dev = input_dev;
279 ds->info = di; 274 ds->info = di;
280 wake_lock_init(&ds->wake_lock, WAKE_LOCK_SUSPEND, "gpio_input");
281 spin_lock_init(&ds->irq_lock); 275 spin_lock_init(&ds->irq_lock);
282 276
283 for (i = 0; i < di->keymap_size; i++) { 277 for (i = 0; i < di->keymap_size; i++) {
@@ -336,7 +330,6 @@ err_gpio_configure_failed:
336err_gpio_request_failed: 330err_gpio_request_failed:
337 ; 331 ;
338 } 332 }
339 wake_lock_destroy(&ds->wake_lock);
340 kfree(ds); 333 kfree(ds);
341err_ds_alloc_failed: 334err_ds_alloc_failed:
342 return ret; 335 return ret;
diff --git a/drivers/staging/dream/gpio_matrix.c b/drivers/staging/dream/gpio_matrix.c
index c1f47651a49..796de4faf85 100644
--- a/drivers/staging/dream/gpio_matrix.c
+++ b/drivers/staging/dream/gpio_matrix.c
@@ -18,13 +18,11 @@
18#include <linux/gpio_event.h> 18#include <linux/gpio_event.h>
19#include <linux/hrtimer.h> 19#include <linux/hrtimer.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/wakelock.h>
22 21
23struct gpio_kp { 22struct gpio_kp {
24 struct input_dev *input_dev; 23 struct input_dev *input_dev;
25 struct gpio_event_matrix_info *keypad_info; 24 struct gpio_event_matrix_info *keypad_info;
26 struct hrtimer timer; 25 struct hrtimer timer;
27 struct wake_lock wake_lock;
28 int current_output; 26 int current_output;
29 unsigned int use_irq:1; 27 unsigned int use_irq:1;
30 unsigned int key_state_changed:1; 28 unsigned int key_state_changed:1;
@@ -199,7 +197,6 @@ static enum hrtimer_restart gpio_keypad_timer_func(struct hrtimer *timer)
199 } 197 }
200 for (in = 0; in < mi->ninputs; in++) 198 for (in = 0; in < mi->ninputs; in++)
201 enable_irq(gpio_to_irq(mi->input_gpios[in])); 199 enable_irq(gpio_to_irq(mi->input_gpios[in]));
202 wake_unlock(&kp->wake_lock);
203 return HRTIMER_NORESTART; 200 return HRTIMER_NORESTART;
204} 201}
205 202
@@ -222,7 +219,6 @@ static irqreturn_t gpio_keypad_irq_handler(int irq_in, void *dev_id)
222 else 219 else
223 gpio_direction_input(mi->output_gpios[i]); 220 gpio_direction_input(mi->output_gpios[i]);
224 } 221 }
225 wake_lock(&kp->wake_lock);
226 hrtimer_start(&kp->timer, ktime_set(0, 0), HRTIMER_MODE_REL); 222 hrtimer_start(&kp->timer, ktime_set(0, 0), HRTIMER_MODE_REL);
227 return IRQ_HANDLED; 223 return IRQ_HANDLED;
228} 224}
@@ -363,7 +359,6 @@ int gpio_event_matrix_func(struct input_dev *input_dev,
363 359
364 hrtimer_init(&kp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 360 hrtimer_init(&kp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
365 kp->timer.function = gpio_keypad_timer_func; 361 kp->timer.function = gpio_keypad_timer_func;
366 wake_lock_init(&kp->wake_lock, WAKE_LOCK_SUSPEND, "gpio_kp");
367 err = gpio_keypad_request_irqs(kp); 362 err = gpio_keypad_request_irqs(kp);
368 kp->use_irq = err == 0; 363 kp->use_irq = err == 0;
369 364
@@ -371,8 +366,6 @@ int gpio_event_matrix_func(struct input_dev *input_dev,
371 "in %s mode\n", input_dev->name, 366 "in %s mode\n", input_dev->name,
372 kp->use_irq ? "interrupt" : "polling"); 367 kp->use_irq ? "interrupt" : "polling");
373 368
374 if (kp->use_irq)
375 wake_lock(&kp->wake_lock);
376 hrtimer_start(&kp->timer, ktime_set(0, 0), HRTIMER_MODE_REL); 369 hrtimer_start(&kp->timer, ktime_set(0, 0), HRTIMER_MODE_REL);
377 370
378 return 0; 371 return 0;
@@ -386,7 +379,6 @@ int gpio_event_matrix_func(struct input_dev *input_dev,
386 free_irq(gpio_to_irq(mi->input_gpios[i]), kp); 379 free_irq(gpio_to_irq(mi->input_gpios[i]), kp);
387 380
388 hrtimer_cancel(&kp->timer); 381 hrtimer_cancel(&kp->timer);
389 wake_lock_destroy(&kp->wake_lock);
390 for (i = mi->noutputs - 1; i >= 0; i--) { 382 for (i = mi->noutputs - 1; i >= 0; i--) {
391err_gpio_direction_input_failed: 383err_gpio_direction_input_failed:
392 gpio_free(mi->input_gpios[i]); 384 gpio_free(mi->input_gpios[i]);
diff --git a/drivers/staging/dream/qdsp5/adsp.c b/drivers/staging/dream/qdsp5/adsp.c
index d096456688d..9069535fcaf 100644
--- a/drivers/staging/dream/qdsp5/adsp.c
+++ b/drivers/staging/dream/qdsp5/adsp.c
@@ -32,16 +32,12 @@
32#include <linux/module.h> 32#include <linux/module.h>
33#include <linux/uaccess.h> 33#include <linux/uaccess.h>
34#include <linux/wait.h> 34#include <linux/wait.h>
35#include <linux/wakelock.h>
36 35
37static struct wake_lock adsp_wake_lock;
38static inline void prevent_suspend(void) 36static inline void prevent_suspend(void)
39{ 37{
40 wake_lock(&adsp_wake_lock);
41} 38}
42static inline void allow_suspend(void) 39static inline void allow_suspend(void)
43{ 40{
44 wake_unlock(&adsp_wake_lock);
45} 41}
46 42
47#include <linux/io.h> 43#include <linux/io.h>
@@ -1046,7 +1042,6 @@ static int msm_adsp_probe(struct platform_device *pdev)
1046 1042
1047 pr_info("adsp: probe\n"); 1043 pr_info("adsp: probe\n");
1048 1044
1049 wake_lock_init(&adsp_wake_lock, WAKE_LOCK_SUSPEND, "adsp");
1050#if CONFIG_MSM_AMSS_VERSION >= 6350 1045#if CONFIG_MSM_AMSS_VERSION >= 6350
1051 adsp_info.init_info_ptr = kzalloc( 1046 adsp_info.init_info_ptr = kzalloc(
1052 (sizeof(struct adsp_rtos_mp_mtoa_init_info_type)), GFP_KERNEL); 1047 (sizeof(struct adsp_rtos_mp_mtoa_init_info_type)), GFP_KERNEL);
diff --git a/drivers/staging/dream/qdsp5/audio_out.c b/drivers/staging/dream/qdsp5/audio_out.c
index d1adcf65f2b..df87ca337b9 100644
--- a/drivers/staging/dream/qdsp5/audio_out.c
+++ b/drivers/staging/dream/qdsp5/audio_out.c
@@ -38,8 +38,6 @@
38#include <mach/qdsp5/qdsp5audppcmdi.h> 38#include <mach/qdsp5/qdsp5audppcmdi.h>
39#include <mach/qdsp5/qdsp5audppmsg.h> 39#include <mach/qdsp5/qdsp5audppmsg.h>
40 40
41#include <mach/htc_pwrsink.h>
42
43#include "evlog.h" 41#include "evlog.h"
44 42
45#define LOG_AUDIO_EVENTS 1 43#define LOG_AUDIO_EVENTS 1
@@ -260,7 +258,6 @@ static int audio_enable(struct audio *audio)
260 } 258 }
261 259
262 audio->enabled = 1; 260 audio->enabled = 1;
263 htc_pwrsink_set(PWRSINK_AUDIO, 100);
264 return 0; 261 return 0;
265} 262}
266 263
@@ -695,7 +692,6 @@ static int audio_release(struct inode *inode, struct file *file)
695 audio_flush(audio); 692 audio_flush(audio);
696 audio->opened = 0; 693 audio->opened = 0;
697 mutex_unlock(&audio->lock); 694 mutex_unlock(&audio->lock);
698 htc_pwrsink_set(PWRSINK_AUDIO, 0);
699 return 0; 695 return 0;
700} 696}
701 697
diff --git a/drivers/staging/dream/smd/smd_qmi.c b/drivers/staging/dream/smd/smd_qmi.c
index d4e7d880462..687db142904 100644
--- a/drivers/staging/dream/smd/smd_qmi.c
+++ b/drivers/staging/dream/smd/smd_qmi.c
@@ -24,7 +24,6 @@
24#include <linux/wait.h> 24#include <linux/wait.h>
25#include <linux/miscdevice.h> 25#include <linux/miscdevice.h>
26#include <linux/workqueue.h> 26#include <linux/workqueue.h>
27#include <linux/wakelock.h>
28 27
29#include <asm/uaccess.h> 28#include <asm/uaccess.h>
30#include <mach/msm_smd.h> 29#include <mach/msm_smd.h>
@@ -74,7 +73,6 @@ struct qmi_ctxt {
74 73
75 smd_channel_t *ch; 74 smd_channel_t *ch;
76 const char *ch_name; 75 const char *ch_name;
77 struct wake_lock wake_lock;
78 76
79 struct work_struct open_work; 77 struct work_struct open_work;
80 struct work_struct read_work; 78 struct work_struct read_work;
@@ -90,7 +88,6 @@ void qmi_ctxt_init(struct qmi_ctxt *ctxt, unsigned n)
90 mutex_init(&ctxt->lock); 88 mutex_init(&ctxt->lock);
91 INIT_WORK(&ctxt->read_work, qmi_read_work); 89 INIT_WORK(&ctxt->read_work, qmi_read_work);
92 INIT_WORK(&ctxt->open_work, qmi_open_work); 90 INIT_WORK(&ctxt->open_work, qmi_open_work);
93 wake_lock_init(&ctxt->wake_lock, WAKE_LOCK_SUSPEND, ctxt->misc.name);
94 ctxt->ctl_txn_id = 1; 91 ctxt->ctl_txn_id = 1;
95 ctxt->wds_txn_id = 1; 92 ctxt->wds_txn_id = 1;
96 ctxt->wds_busy = 1; 93 ctxt->wds_busy = 1;
@@ -454,7 +451,6 @@ static void qmi_process_qmux(struct qmi_ctxt *ctxt,
454 break; 451 break;
455 } 452 }
456 mutex_unlock(&ctxt->lock); 453 mutex_unlock(&ctxt->lock);
457
458 wake_up(&qmi_wait_queue); 454 wake_up(&qmi_wait_queue);
459} 455}
460 456
@@ -509,7 +505,6 @@ static void qmi_notify(void *priv, unsigned event)
509 int sz; 505 int sz;
510 sz = smd_cur_packet_size(ctxt->ch); 506 sz = smd_cur_packet_size(ctxt->ch);
511 if ((sz > 0) && (sz <= smd_read_avail(ctxt->ch))) { 507 if ((sz > 0) && (sz <= smd_read_avail(ctxt->ch))) {
512 wake_lock_timeout(&ctxt->wake_lock, HZ / 2);
513 queue_work(qmi_wq, &ctxt->read_work); 508 queue_work(qmi_wq, &ctxt->read_work);
514 } 509 }
515 break; 510 break;
diff --git a/drivers/staging/dream/smd/smd_rpcrouter.c b/drivers/staging/dream/smd/smd_rpcrouter.c
index d4a4a887e42..5ac2cd4a597 100644
--- a/drivers/staging/dream/smd/smd_rpcrouter.c
+++ b/drivers/staging/dream/smd/smd_rpcrouter.c
@@ -33,7 +33,6 @@
33#include <linux/err.h> 33#include <linux/err.h>
34#include <linux/sched.h> 34#include <linux/sched.h>
35#include <linux/poll.h> 35#include <linux/poll.h>
36#include <linux/wakelock.h>
37#include <asm/uaccess.h> 36#include <asm/uaccess.h>
38#include <asm/byteorder.h> 37#include <asm/byteorder.h>
39#include <linux/platform_device.h> 38#include <linux/platform_device.h>
@@ -96,7 +95,6 @@ static DEFINE_SPINLOCK(server_list_lock);
96static DEFINE_SPINLOCK(smd_lock); 95static DEFINE_SPINLOCK(smd_lock);
97 96
98static struct workqueue_struct *rpcrouter_workqueue; 97static struct workqueue_struct *rpcrouter_workqueue;
99static struct wake_lock rpcrouter_wake_lock;
100static int rpcrouter_need_len; 98static int rpcrouter_need_len;
101 99
102static atomic_t next_xid = ATOMIC_INIT(1); 100static atomic_t next_xid = ATOMIC_INIT(1);
@@ -290,7 +288,6 @@ struct msm_rpc_endpoint *msm_rpcrouter_create_local_endpoint(dev_t dev)
290 init_waitqueue_head(&ept->wait_q); 288 init_waitqueue_head(&ept->wait_q);
291 INIT_LIST_HEAD(&ept->read_q); 289 INIT_LIST_HEAD(&ept->read_q);
292 spin_lock_init(&ept->read_q_lock); 290 spin_lock_init(&ept->read_q_lock);
293 wake_lock_init(&ept->read_q_wake_lock, WAKE_LOCK_SUSPEND, "rpc_read");
294 INIT_LIST_HEAD(&ept->incomplete); 291 INIT_LIST_HEAD(&ept->incomplete);
295 292
296 spin_lock_irqsave(&local_endpoints_lock, flags); 293 spin_lock_irqsave(&local_endpoints_lock, flags);
@@ -313,7 +310,6 @@ int msm_rpcrouter_destroy_local_endpoint(struct msm_rpc_endpoint *ept)
313 if (rc < 0) 310 if (rc < 0)
314 return rc; 311 return rc;
315 312
316 wake_lock_destroy(&ept->read_q_wake_lock);
317 list_del(&ept->list); 313 list_del(&ept->list);
318 kfree(ept); 314 kfree(ept);
319 return 0; 315 return 0;
@@ -540,8 +536,6 @@ static void rpcrouter_smdnotify(void *_dev, unsigned event)
540 if (event != SMD_EVENT_DATA) 536 if (event != SMD_EVENT_DATA)
541 return; 537 return;
542 538
543 if (smd_read_avail(smd_channel) >= rpcrouter_need_len)
544 wake_lock(&rpcrouter_wake_lock);
545 wake_up(&smd_wait); 539 wake_up(&smd_wait);
546} 540}
547 541
@@ -576,7 +570,6 @@ static int rr_read(void *data, int len)
576 return -EIO; 570 return -EIO;
577 } 571 }
578 rpcrouter_need_len = len; 572 rpcrouter_need_len = len;
579 wake_unlock(&rpcrouter_wake_lock);
580 spin_unlock_irqrestore(&smd_lock, flags); 573 spin_unlock_irqrestore(&smd_lock, flags);
581 574
582// printk("rr_read: waiting (%d)\n", len); 575// printk("rr_read: waiting (%d)\n", len);
@@ -676,7 +669,6 @@ static void do_read_data(struct work_struct *work)
676 669
677packet_complete: 670packet_complete:
678 spin_lock_irqsave(&ept->read_q_lock, flags); 671 spin_lock_irqsave(&ept->read_q_lock, flags);
679 wake_lock(&ept->read_q_wake_lock);
680 list_add_tail(&pkt->list, &ept->read_q); 672 list_add_tail(&pkt->list, &ept->read_q);
681 wake_up(&ept->wait_q); 673 wake_up(&ept->wait_q);
682 spin_unlock_irqrestore(&ept->read_q_lock, flags); 674 spin_unlock_irqrestore(&ept->read_q_lock, flags);
@@ -699,7 +691,6 @@ done:
699fail_io: 691fail_io:
700fail_data: 692fail_data:
701 printk(KERN_ERR "rpc_router has died\n"); 693 printk(KERN_ERR "rpc_router has died\n");
702 wake_unlock(&rpcrouter_wake_lock);
703} 694}
704 695
705void msm_rpc_setup_req(struct rpc_request_hdr *hdr, uint32_t prog, 696void msm_rpc_setup_req(struct rpc_request_hdr *hdr, uint32_t prog,
@@ -1061,8 +1052,6 @@ int __msm_rpc_read(struct msm_rpc_endpoint *ept,
1061 return -ETOOSMALL; 1052 return -ETOOSMALL;
1062 } 1053 }
1063 list_del(&pkt->list); 1054 list_del(&pkt->list);
1064 if (list_empty(&ept->read_q))
1065 wake_unlock(&ept->read_q_wake_lock);
1066 spin_unlock_irqrestore(&ept->read_q_lock, flags); 1055 spin_unlock_irqrestore(&ept->read_q_lock, flags);
1067 1056
1068 rc = pkt->length; 1057 rc = pkt->length;
@@ -1229,7 +1218,6 @@ static int msm_rpcrouter_probe(struct platform_device *pdev)
1229 1218
1230 init_waitqueue_head(&newserver_wait); 1219 init_waitqueue_head(&newserver_wait);
1231 init_waitqueue_head(&smd_wait); 1220 init_waitqueue_head(&smd_wait);
1232 wake_lock_init(&rpcrouter_wake_lock, WAKE_LOCK_SUSPEND, "SMD_RPCCALL");
1233 1221
1234 rpcrouter_workqueue = create_singlethread_workqueue("rpcrouter"); 1222 rpcrouter_workqueue = create_singlethread_workqueue("rpcrouter");
1235 if (!rpcrouter_workqueue) 1223 if (!rpcrouter_workqueue)
diff --git a/drivers/staging/dream/smd/smd_tty.c b/drivers/staging/dream/smd/smd_tty.c
index 2edd9d1ec2d..f40944958d4 100644
--- a/drivers/staging/dream/smd/smd_tty.c
+++ b/drivers/staging/dream/smd/smd_tty.c
@@ -19,7 +19,6 @@
19#include <linux/cdev.h> 19#include <linux/cdev.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/wait.h> 21#include <linux/wait.h>
22#include <linux/wakelock.h>
23 22
24#include <linux/tty.h> 23#include <linux/tty.h>
25#include <linux/tty_driver.h> 24#include <linux/tty_driver.h>
@@ -34,7 +33,6 @@ static DEFINE_MUTEX(smd_tty_lock);
34struct smd_tty_info { 33struct smd_tty_info {
35 smd_channel_t *ch; 34 smd_channel_t *ch;
36 struct tty_struct *tty; 35 struct tty_struct *tty;
37 struct wake_lock wake_lock;
38 int open_count; 36 int open_count;
39}; 37};
40 38
@@ -69,7 +67,6 @@ static void smd_tty_notify(void *priv, unsigned event)
69 printk(KERN_ERR "OOPS - smd_tty_buffer mismatch?!"); 67 printk(KERN_ERR "OOPS - smd_tty_buffer mismatch?!");
70 } 68 }
71 69
72 wake_lock_timeout(&info->wake_lock, HZ / 2);
73 tty_flip_buffer_push(tty); 70 tty_flip_buffer_push(tty);
74 } 71 }
75 72
@@ -95,7 +92,6 @@ static int smd_tty_open(struct tty_struct *tty, struct file *f)
95 info = smd_tty + n; 92 info = smd_tty + n;
96 93
97 mutex_lock(&smd_tty_lock); 94 mutex_lock(&smd_tty_lock);
98 wake_lock_init(&info->wake_lock, WAKE_LOCK_SUSPEND, name);
99 tty->driver_data = info; 95 tty->driver_data = info;
100 96
101 if (info->open_count++ == 0) { 97 if (info->open_count++ == 0) {
@@ -122,7 +118,6 @@ static void smd_tty_close(struct tty_struct *tty, struct file *f)
122 if (--info->open_count == 0) { 118 if (--info->open_count == 0) {
123 info->tty = 0; 119 info->tty = 0;
124 tty->driver_data = 0; 120 tty->driver_data = 0;
125 wake_lock_destroy(&info->wake_lock);
126 if (info->ch) { 121 if (info->ch) {
127 smd_close(info->ch); 122 smd_close(info->ch);
128 info->ch = 0; 123 info->ch = 0;