Custom Search
|
|
Re: [PATCH v5] input: Add MELFAS mms114 touchscreen driver | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |