lkml.org 
[lkml]   [2006]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] hwmon: Semaphore to mutex conversions
From
Date

> @@ -325,7 +326,7 @@ static void hdaps_mousedev_poll(unsigned
> int x, y;
>
> /* Cannot sleep. Try nonblockingly. If we fail, try again later. */
> - if (down_trylock(&hdaps_sem)) {
> + if (!mutex_trylock(&hdaps_mutex)) {
> mod_timer(&hdaps_timer,jiffies + HDAPS_POLL_PERIOD);
> return;
> }
> @@ -340,7 +341,7 @@ static void hdaps_mousedev_poll(unsigned
> mod_timer(&hdaps_timer, jiffies + HDAPS_POLL_PERIOD);
>
> out:
> - up(&hdaps_sem);
> + mutex_unlock(&hdaps_mutex);
> }
>


this isn't right; this is run in irq context!
-
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/

\
 
 \ /
  Last update: 2006-04-03 14:41    [W:0.040 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site