From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: linux-input@vger.kernel.org, rydberg@euromail.se,
kyungmin.park@samsung.com
Subject: Re: [PATCH v5] input: Add MELFAS mms114 touchscreen driver
Date: Thu, 24 May 2012 00:53:52 -0700 [thread overview]
Message-ID: <20120524075352.GB10562@core.coreip.homeip.net> (raw)
In-Reply-To: <1337841467-20717-1-git-send-email-jy0922.shim@samsung.com>
Hi Joonyoung,
On Thu, May 24, 2012 at 03:37:47PM +0900, Joonyoung Shim wrote:
> +
> +static int mms114_start(struct mms114_data *data)
> +{
> + int error;
> +
> + mutex_lock(&data->mutex);
> + if (data->enabled)
> + goto out;
This seems too complicated. You already take input_dev->mutex in
suspend/resume and open/close are called with this mutex held so you do
not need yet another mutex here.
Same goes for data->enabled - you can go by the fact that number of
users != 0.
It also looks like you want to bring enabling/disabling IRQ into
start/stop and probably cfg_pin as well.
Thanks.
--
Dmitry
prev parent reply other threads:[~2012-05-24 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 6:37 [PATCH v5] input: Add MELFAS mms114 touchscreen driver Joonyoung Shim
2012-05-24 7:21 ` Henrik Rydberg
2012-05-24 7:46 ` Joonyoung Shim
2012-05-24 7:53 ` Dmitry Torokhov [this message]
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=20120524075352.GB10562@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-input@vger.kernel.org \
--cc=rydberg@euromail.se \
/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;
as well as URLs for NNTP newsgroup(s).