On Tue, 31 May 2016, David Kershner wrote:
> From: Bryan Thompson <[email protected]>
>
> visordriver_callback_lock is just a binary semaphore that logically
> makes more sense as a mutex.
>
> Signed-off-by: Bryan Thompson <[email protected]>
> Signed-off-by: David Kershner <[email protected]>
> Reviewed-by: Tim Sell <[email protected]>
> ---
> drivers/staging/unisys/include/visorbus.h | 3 ++-
> drivers/staging/unisys/visorbus/visorbus_main.c | 10 +++++-----
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/unisys/include/visorbus.h
> b/drivers/staging/unisys/include/visorbus.h
> index 9bb88bb..9da25c0 100644
> --- 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.
Thanks,
tglx
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel