lkml.org 
[lkml]   [2012]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] HID: i2c-hid: add mutex protecting open/close race
Hi Benjamin,

On Wed, 12 Dec 2012 17:12:16 +0100, Benjamin Tissoires wrote:
> We should not enter close function while someone else is in open.
> This mutex prevents this race.
>
> There is also no need to override the ret value with -EIO in case of
> a failure of i2c_hid_set_power.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
> ---

Looks good to me except that you forgot to include <linux/mutex.h> and
this could cause build failures on some architectures/configs.

Once this is fixed, you can add:

Reviewed-by: Jean Delvare <khali@linux-fr.org>

--
Jean Delvare


\
 
 \ /
  Last update: 2012-12-12 18:01    [W:0.039 / U:1.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site