public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>,
	linux-input@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: i2c-hid: add mutex protecting open/close race
Date: Wed, 12 Dec 2012 17:34:44 +0100	[thread overview]
Message-ID: <20121212173444.471d5cc6@endymion.delvare> (raw)
In-Reply-To: <1355328736-31418-1-git-send-email-benjamin.tissoires@gmail.com>

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

  reply	other threads:[~2012-12-12 16:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 16:12 [PATCH] HID: i2c-hid: add mutex protecting open/close race Benjamin Tissoires
2012-12-12 16:34 ` Jean Delvare [this message]
     [not found]   ` <20121212173444.471d5cc6-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-12-12 16:54     ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121212173444.471d5cc6@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=benjamin.tissoires@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox