hwmon: Semaphore to mutex conversions
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines
(quoted diff) +1
-1@@ -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; }
Review static void hdaps_mousedev_poll(unsigned · line 346
Quoted 7 lines
(quoted diff) +1
-1@@ -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!