Re: [PATCH] hwmon: Semaphore to mutex conversions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux