From fcdd1185e6a542d867f0ea298c64c5c1ba3f5d9c Mon Sep 17 00:00:00 2001 From: Paul Parsons Date: Fri, 13 May 2011 02:46:03 +0100 Subject: [PATCH] --- yaml --- r: 248504 b: refs/heads/master c: fda5fe19725edd6805f2fd742235d1a0d0ba93f5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/char/apm-emulation.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 6894a4dcc1c3..36170a6b8d0f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81024fc41a9353160bc445fda4f96d1aa5e82791 +refs/heads/master: fda5fe19725edd6805f2fd742235d1a0d0ba93f5 diff --git a/trunk/drivers/char/apm-emulation.c b/trunk/drivers/char/apm-emulation.c index 45b987c9889e..548708c4b2b8 100644 --- a/trunk/drivers/char/apm-emulation.c +++ b/trunk/drivers/char/apm-emulation.c @@ -126,7 +126,6 @@ struct apm_user { /* * Local variables */ -static DEFINE_MUTEX(apm_mutex); static atomic_t suspend_acks_pending = ATOMIC_INIT(0); static atomic_t userspace_notification_inhibit = ATOMIC_INIT(0); static int apm_disabled; @@ -275,7 +274,6 @@ apm_ioctl(struct file *filp, u_int cmd, u_long arg) if (!as->suser || !as->writer) return -EPERM; - mutex_lock(&apm_mutex); switch (cmd) { case APM_IOC_SUSPEND: mutex_lock(&state_lock); @@ -336,7 +334,6 @@ apm_ioctl(struct file *filp, u_int cmd, u_long arg) mutex_unlock(&state_lock); break; } - mutex_unlock(&apm_mutex); return err; } @@ -371,7 +368,6 @@ static int apm_open(struct inode * inode, struct file * filp) { struct apm_user *as; - mutex_lock(&apm_mutex); as = kzalloc(sizeof(*as), GFP_KERNEL); if (as) { /* @@ -391,7 +387,6 @@ static int apm_open(struct inode * inode, struct file * filp) filp->private_data = as; } - mutex_unlock(&apm_mutex); return as ? 0 : -ENOMEM; }