login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
14
Re: [patch 1/2] hdaps: fix locking
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Nick Piggin
Subject:
Re: [patch 1/2] hdaps: fix locking
Date: Sunday, October 14, 2007 - 12:28 am
On Sun, Oct 14, 2007 at 09:25:23AM +0200, Nick Piggin wrote:
quoted text
> Here are a couple of fixes for the hdaps driver. I have kind of been > blocking out the bug traces caused by these (the 2nd patch, actually) > thinking that it's one of those transient / churn things... but it's > getting annoying now because I think it turns off lockdep. After this > patch it no longer produces warnings, but I don't actually know if it > does the right thing (because I don't really know what the driver > does or how to test it anyway!). >
Ahh, forget that, I see the patch in -mm now, which should go in instead.
quoted text
> --- > > hdaps was using incorrect mutex_trylock return code. > > Signed-off-by: Nick Piggin <npiggin@suse.de> > > --- > Index: linux-2.6/drivers/hwmon/hdaps.c > =================================================================== > --- linux-2.6.orig/drivers/hwmon/hdaps.c > +++ linux-2.6/drivers/hwmon/hdaps.c > @@ -328,22 +328,20 @@ static void hdaps_mousedev_poll(unsigned > int x, y; > > /* Cannot sleep. Try nonblockingly. If we fail, try again later. */ > - if (mutex_trylock(&hdaps_mtx)) { > - mod_timer(&hdaps_timer,jiffies + HDAPS_POLL_PERIOD); > - return; > - } > + if (!mutex_trylock(&hdaps_mtx)) > + goto out; > > if (__hdaps_read_pair(HDAPS_PORT_XPOS, HDAPS_PORT_YPOS, &x, &y)) > - goto out; > + goto out_lock; > > input_report_abs(hdaps_idev, ABS_X, x - rest_x); > input_report_abs(hdaps_idev, ABS_Y, y - rest_y); > input_sync(hdaps_idev); > > - mod_timer(&hdaps_timer, jiffies + HDAPS_POLL_PERIOD); > - > -out: > +out_lock: > mutex_unlock(&hdaps_mtx); > +out: > + mod_timer(&hdaps_timer, jiffies + HDAPS_POLL_PERIOD); > } > >
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch 1/2] hdaps: fix locking
, Nick Piggin
, (Sun Oct 14, 12:25 am)
Re: [patch 1/2] hdaps: fix locking
, Nick Piggin
, (Sun Oct 14, 12:28 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Michael Moore
Re: underage models, pre teen models, lolita porn, young preteens, little lolitas
Alex Riesen
Re: [PATCH 4/7] lib: Introduce strnstr()
Thomas Gleixner
[ANNOUNCE] 2.6.31-rc6-rt2
Mathieu Desnoyers
Re: Linux 2.6.25-rc2
git
:
Blaisorblade
git-unpack-objects < pack file in repository doesn't work!
Matthieu Moy
Re: Cloning empty repositories, was Re: What is the idea for bare repositories?
Linus Torvalds
Re: Untracked working tree files
Peter Karlsson
Re: CRLF problems with Git on Win32
Johannes Schindelin
Re: [PATCH 4/4] git-rebase -i: New option to support rebase with merges
linux-netdev
:
Alan Menegotto
Re: Linux networking implementation and packet capture
Andrew Morton
Re: [PATCH] PHYLIB: IRQ event workqueue handling fixes
Timo Teräs
ip xfrm policy semantics
Jarek Poplawski
Re: [PATCH]: Fix queueing return values...
David Miller
Re: [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x
git-commits-head
:
Linux Kernel Mailing List
Blackfin: don't give CPU its own line in traps output
Linux Kernel Mailing List
No need to do lock_super() for exclusion in generic_shutdown_super()
Linux Kernel Mailing List
x86, msr: Export the register-setting MSR functions via /dev/*/msr
Linux Kernel Mailing List
MIPS: SMTC: Fix lockup in smtc_distribute_timer
Linux Kernel Mailing List
powerpc: gamecube/wii: usbgecko bootwrapper console support
openbsd-misc
:
Aaron Mason
Re: Defending OpenBSD Performance
Henning Brauer
Re: Defending OpenBSD Performance
Henning Brauer
Re: Defending OpenBSD Performance
Christiano Farina Haesbaert
Re: Defending OpenBSD Performance
Nick Holland
Re: 1 out of 3 hunks failed--saving rejects to kerberosV/src/lib/krb5/crypto.c.rej
Colocation donated by:
Syndicate