davidker / unisys

Master repository for new changes to drivers/staging/unisys and drivers/visorbus
Other
2 stars 1 forks source link

visorbus: visordriver_callback_lock should be a mutex, not a semaphore #55

Closed selltc closed 8 years ago

selltc commented 8 years ago

Source: Thomas Gleixner tglx@linutronix.de 5/18/2016

See KanBoard-1247.

mriswyth commented 8 years ago

visordriver_callback_lock converted to a mutex in githubissue#55-upstream-next.

5cd97a915b5a32142902f06a60f915128782582e

selltc commented 8 years ago

Comments on this patch were provided by Thomas Gleixner tglx@linutronix.de 6/1

--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -161,7 +161,8 @@ struct visor_device {
  struct timer_list timer;
  bool timer_active;
  bool being_removed;
- struct semaphore visordriver_callback_lock;
+ /* mutex to serialize visor_driver function callbacks */

TBH. I hate these kind of comments. The mutex name is self explaining, right? I rather wish you would have spent time documenting the non obvious parts of the code.

selltc commented 8 years ago

8/15: Greg applied this to staging-next with: