Re: [PATCH] hwmon: Semaphore to mutex conversions

From: Arjan van de Ven
Date: Sun Apr 02 2006 - 13:05:29 EST



> @@ -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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/