Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175174
b: refs/heads/master
c: ace9e79
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Machek authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent a226740 commit a354778
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 55 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05d42522017df477f16c0ebc2d65aa8bde6e0e86
refs/heads/master: ace9e7915badc44d0240b12ca9817b0171623f29
7 changes: 1 addition & 6 deletions trunk/drivers/staging/dream/camera/msm_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <mach/board.h>

#include <linux/fs.h>
Expand Down Expand Up @@ -1597,7 +1598,6 @@ static int __msm_release(struct msm_sync *sync)
MSM_DRAIN_QUEUE(sync, pict_frame_q);

sync->sctrl.s_release();
wake_unlock(&sync->wake_lock);

sync->apps_id = NULL;
CDBG("msm_release completed!\n");
Expand Down Expand Up @@ -1806,7 +1806,6 @@ static int __msm_open(struct msm_sync *sync, const char *const apps_id)
sync->apps_id = apps_id;

if (!sync->opencnt) {
wake_lock(&sync->wake_lock);

msm_camvfe_fn_init(&sync->vfefn, sync);
if (sync->vfefn.vfe_init) {
Expand Down Expand Up @@ -2044,8 +2043,6 @@ static int msm_sync_init(struct msm_sync *sync,
INIT_LIST_HEAD(&sync->pict_frame_q);
init_waitqueue_head(&sync->pict_frame_wait);

wake_lock_init(&sync->wake_lock, WAKE_LOCK_IDLE, "msm_camera");

rc = msm_camio_probe_on(pdev);
if (rc < 0)
return rc;
Expand All @@ -2058,7 +2055,6 @@ static int msm_sync_init(struct msm_sync *sync,
if (rc < 0) {
pr_err("msm_camera: failed to initialize %s\n",
sync->sdata->sensor_name);
wake_lock_destroy(&sync->wake_lock);
return rc;
}

Expand All @@ -2070,7 +2066,6 @@ static int msm_sync_init(struct msm_sync *sync,

static int msm_sync_destroy(struct msm_sync *sync)
{
wake_lock_destroy(&sync->wake_lock);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/dream/camera/msm_vfe7x.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <linux/msm_adsp.h>
#include <linux/uaccess.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/android_pmem.h>
#include <mach/msm_adsp.h>
#include <linux/delay.h>
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/dream/gpio_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*/

#include <linux/earlysuspend.h>

#include <linux/module.h>
#include <linux/input.h>
#include <linux/gpio_event.h>
Expand All @@ -23,7 +23,6 @@
struct gpio_event {
struct input_dev *input_dev;
const struct gpio_event_platform_data *info;
struct early_suspend early_suspend;
void *state[0];
};

Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/staging/dream/gpio_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/hrtimer.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/wakelock.h>

enum {
DEBOUNCE_UNSTABLE = BIT(0), /* Got irq, while debouncing */
Expand All @@ -44,7 +43,6 @@ struct gpio_input_state {
int use_irq;
int debounce_count;
spinlock_t irq_lock;
struct wake_lock wake_lock;
struct gpio_key_state key_state[0];
};

Expand Down Expand Up @@ -143,8 +141,6 @@ static enum hrtimer_restart gpio_event_input_timer_func(struct hrtimer *timer)
hrtimer_start(timer, ds->info->debounce_time, HRTIMER_MODE_REL);
else if (!ds->use_irq)
hrtimer_start(timer, ds->info->poll_time, HRTIMER_MODE_REL);
else
wake_unlock(&ds->wake_lock);

spin_unlock_irqrestore(&ds->irq_lock, irqflags);

Expand All @@ -170,7 +166,6 @@ static irqreturn_t gpio_event_input_irq_handler(int irq, void *dev_id)
if (ks->debounce & DEBOUNCE_WAIT_IRQ) {
ks->debounce = DEBOUNCE_UNKNOWN;
if (ds->debounce_count++ == 0) {
wake_lock(&ds->wake_lock);
hrtimer_start(
&ds->timer, ds->info->debounce_time,
HRTIMER_MODE_REL);
Expand Down Expand Up @@ -277,7 +272,6 @@ int gpio_event_input_func(struct input_dev *input_dev,
ds->debounce_count = di->keymap_size;
ds->input_dev = input_dev;
ds->info = di;
wake_lock_init(&ds->wake_lock, WAKE_LOCK_SUSPEND, "gpio_input");
spin_lock_init(&ds->irq_lock);

for (i = 0; i < di->keymap_size; i++) {
Expand Down Expand Up @@ -336,7 +330,6 @@ int gpio_event_input_func(struct input_dev *input_dev,
err_gpio_request_failed:
;
}
wake_lock_destroy(&ds->wake_lock);
kfree(ds);
err_ds_alloc_failed:
return ret;
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/staging/dream/gpio_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
#include <linux/gpio_event.h>
#include <linux/hrtimer.h>
#include <linux/interrupt.h>
#include <linux/wakelock.h>

struct gpio_kp {
struct input_dev *input_dev;
struct gpio_event_matrix_info *keypad_info;
struct hrtimer timer;
struct wake_lock wake_lock;
int current_output;
unsigned int use_irq:1;
unsigned int key_state_changed:1;
Expand Down Expand Up @@ -199,7 +197,6 @@ static enum hrtimer_restart gpio_keypad_timer_func(struct hrtimer *timer)
}
for (in = 0; in < mi->ninputs; in++)
enable_irq(gpio_to_irq(mi->input_gpios[in]));
wake_unlock(&kp->wake_lock);
return HRTIMER_NORESTART;
}

Expand All @@ -222,7 +219,6 @@ static irqreturn_t gpio_keypad_irq_handler(int irq_in, void *dev_id)
else
gpio_direction_input(mi->output_gpios[i]);
}
wake_lock(&kp->wake_lock);
hrtimer_start(&kp->timer, ktime_set(0, 0), HRTIMER_MODE_REL);
return IRQ_HANDLED;
}
Expand Down Expand Up @@ -363,16 +359,13 @@ int gpio_event_matrix_func(struct input_dev *input_dev,

hrtimer_init(&kp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
kp->timer.function = gpio_keypad_timer_func;
wake_lock_init(&kp->wake_lock, WAKE_LOCK_SUSPEND, "gpio_kp");
err = gpio_keypad_request_irqs(kp);
kp->use_irq = err == 0;

pr_info("GPIO Matrix Keypad Driver: Start keypad matrix for %s "
"in %s mode\n", input_dev->name,
kp->use_irq ? "interrupt" : "polling");

if (kp->use_irq)
wake_lock(&kp->wake_lock);
hrtimer_start(&kp->timer, ktime_set(0, 0), HRTIMER_MODE_REL);

return 0;
Expand All @@ -386,7 +379,6 @@ int gpio_event_matrix_func(struct input_dev *input_dev,
free_irq(gpio_to_irq(mi->input_gpios[i]), kp);

hrtimer_cancel(&kp->timer);
wake_lock_destroy(&kp->wake_lock);
for (i = mi->noutputs - 1; i >= 0; i--) {
err_gpio_direction_input_failed:
gpio_free(mi->input_gpios[i]);
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/staging/dream/qdsp5/adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/wait.h>
#include <linux/wakelock.h>

static struct wake_lock adsp_wake_lock;
static inline void prevent_suspend(void)
{
wake_lock(&adsp_wake_lock);
}
static inline void allow_suspend(void)
{
wake_unlock(&adsp_wake_lock);
}

#include <linux/io.h>
Expand Down Expand Up @@ -1046,7 +1042,6 @@ static int msm_adsp_probe(struct platform_device *pdev)

pr_info("adsp: probe\n");

wake_lock_init(&adsp_wake_lock, WAKE_LOCK_SUSPEND, "adsp");
#if CONFIG_MSM_AMSS_VERSION >= 6350
adsp_info.init_info_ptr = kzalloc(
(sizeof(struct adsp_rtos_mp_mtoa_init_info_type)), GFP_KERNEL);
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/staging/dream/qdsp5/audio_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
#include <mach/qdsp5/qdsp5audppcmdi.h>
#include <mach/qdsp5/qdsp5audppmsg.h>

#include <mach/htc_pwrsink.h>

#include "evlog.h"

#define LOG_AUDIO_EVENTS 1
Expand Down Expand Up @@ -260,7 +258,6 @@ static int audio_enable(struct audio *audio)
}

audio->enabled = 1;
htc_pwrsink_set(PWRSINK_AUDIO, 100);
return 0;
}

Expand Down Expand Up @@ -695,7 +692,6 @@ static int audio_release(struct inode *inode, struct file *file)
audio_flush(audio);
audio->opened = 0;
mutex_unlock(&audio->lock);
htc_pwrsink_set(PWRSINK_AUDIO, 0);
return 0;
}

Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/staging/dream/smd/smd_qmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <linux/wait.h>
#include <linux/miscdevice.h>
#include <linux/workqueue.h>
#include <linux/wakelock.h>

#include <asm/uaccess.h>
#include <mach/msm_smd.h>
Expand Down Expand Up @@ -74,7 +73,6 @@ struct qmi_ctxt {

smd_channel_t *ch;
const char *ch_name;
struct wake_lock wake_lock;

struct work_struct open_work;
struct work_struct read_work;
Expand All @@ -90,7 +88,6 @@ void qmi_ctxt_init(struct qmi_ctxt *ctxt, unsigned n)
mutex_init(&ctxt->lock);
INIT_WORK(&ctxt->read_work, qmi_read_work);
INIT_WORK(&ctxt->open_work, qmi_open_work);
wake_lock_init(&ctxt->wake_lock, WAKE_LOCK_SUSPEND, ctxt->misc.name);
ctxt->ctl_txn_id = 1;
ctxt->wds_txn_id = 1;
ctxt->wds_busy = 1;
Expand Down Expand Up @@ -454,7 +451,6 @@ static void qmi_process_qmux(struct qmi_ctxt *ctxt,
break;
}
mutex_unlock(&ctxt->lock);

wake_up(&qmi_wait_queue);
}

Expand Down Expand Up @@ -509,7 +505,6 @@ static void qmi_notify(void *priv, unsigned event)
int sz;
sz = smd_cur_packet_size(ctxt->ch);
if ((sz > 0) && (sz <= smd_read_avail(ctxt->ch))) {
wake_lock_timeout(&ctxt->wake_lock, HZ / 2);
queue_work(qmi_wq, &ctxt->read_work);
}
break;
Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/staging/dream/smd/smd_rpcrouter.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <linux/err.h>
#include <linux/sched.h>
#include <linux/poll.h>
#include <linux/wakelock.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>
#include <linux/platform_device.h>
Expand Down Expand Up @@ -96,7 +95,6 @@ static DEFINE_SPINLOCK(server_list_lock);
static DEFINE_SPINLOCK(smd_lock);

static struct workqueue_struct *rpcrouter_workqueue;
static struct wake_lock rpcrouter_wake_lock;
static int rpcrouter_need_len;

static atomic_t next_xid = ATOMIC_INIT(1);
Expand Down Expand Up @@ -290,7 +288,6 @@ struct msm_rpc_endpoint *msm_rpcrouter_create_local_endpoint(dev_t dev)
init_waitqueue_head(&ept->wait_q);
INIT_LIST_HEAD(&ept->read_q);
spin_lock_init(&ept->read_q_lock);
wake_lock_init(&ept->read_q_wake_lock, WAKE_LOCK_SUSPEND, "rpc_read");
INIT_LIST_HEAD(&ept->incomplete);

spin_lock_irqsave(&local_endpoints_lock, flags);
Expand All @@ -313,7 +310,6 @@ int msm_rpcrouter_destroy_local_endpoint(struct msm_rpc_endpoint *ept)
if (rc < 0)
return rc;

wake_lock_destroy(&ept->read_q_wake_lock);
list_del(&ept->list);
kfree(ept);
return 0;
Expand Down Expand Up @@ -540,8 +536,6 @@ static void rpcrouter_smdnotify(void *_dev, unsigned event)
if (event != SMD_EVENT_DATA)
return;

if (smd_read_avail(smd_channel) >= rpcrouter_need_len)
wake_lock(&rpcrouter_wake_lock);
wake_up(&smd_wait);
}

Expand Down Expand Up @@ -576,7 +570,6 @@ static int rr_read(void *data, int len)
return -EIO;
}
rpcrouter_need_len = len;
wake_unlock(&rpcrouter_wake_lock);
spin_unlock_irqrestore(&smd_lock, flags);

// printk("rr_read: waiting (%d)\n", len);
Expand Down Expand Up @@ -676,7 +669,6 @@ static void do_read_data(struct work_struct *work)

packet_complete:
spin_lock_irqsave(&ept->read_q_lock, flags);
wake_lock(&ept->read_q_wake_lock);
list_add_tail(&pkt->list, &ept->read_q);
wake_up(&ept->wait_q);
spin_unlock_irqrestore(&ept->read_q_lock, flags);
Expand All @@ -699,7 +691,6 @@ static void do_read_data(struct work_struct *work)
fail_io:
fail_data:
printk(KERN_ERR "rpc_router has died\n");
wake_unlock(&rpcrouter_wake_lock);
}

void msm_rpc_setup_req(struct rpc_request_hdr *hdr, uint32_t prog,
Expand Down Expand Up @@ -1061,8 +1052,6 @@ int __msm_rpc_read(struct msm_rpc_endpoint *ept,
return -ETOOSMALL;
}
list_del(&pkt->list);
if (list_empty(&ept->read_q))
wake_unlock(&ept->read_q_wake_lock);
spin_unlock_irqrestore(&ept->read_q_lock, flags);

rc = pkt->length;
Expand Down Expand Up @@ -1229,7 +1218,6 @@ static int msm_rpcrouter_probe(struct platform_device *pdev)

init_waitqueue_head(&newserver_wait);
init_waitqueue_head(&smd_wait);
wake_lock_init(&rpcrouter_wake_lock, WAKE_LOCK_SUSPEND, "SMD_RPCCALL");

rpcrouter_workqueue = create_singlethread_workqueue("rpcrouter");
if (!rpcrouter_workqueue)
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/staging/dream/smd/smd_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/wait.h>
#include <linux/wakelock.h>

#include <linux/tty.h>
#include <linux/tty_driver.h>
Expand All @@ -34,7 +33,6 @@ static DEFINE_MUTEX(smd_tty_lock);
struct smd_tty_info {
smd_channel_t *ch;
struct tty_struct *tty;
struct wake_lock wake_lock;
int open_count;
};

Expand Down Expand Up @@ -69,7 +67,6 @@ static void smd_tty_notify(void *priv, unsigned event)
printk(KERN_ERR "OOPS - smd_tty_buffer mismatch?!");
}

wake_lock_timeout(&info->wake_lock, HZ / 2);
tty_flip_buffer_push(tty);
}

Expand All @@ -95,7 +92,6 @@ static int smd_tty_open(struct tty_struct *tty, struct file *f)
info = smd_tty + n;

mutex_lock(&smd_tty_lock);
wake_lock_init(&info->wake_lock, WAKE_LOCK_SUSPEND, name);
tty->driver_data = info;

if (info->open_count++ == 0) {
Expand All @@ -122,7 +118,6 @@ static void smd_tty_close(struct tty_struct *tty, struct file *f)
if (--info->open_count == 0) {
info->tty = 0;
tty->driver_data = 0;
wake_lock_destroy(&info->wake_lock);
if (info->ch) {
smd_close(info->ch);
info->ch = 0;
Expand Down

0 comments on commit a354778

Please sign in to comment.