Re: [PATCH v4 2/7] Input: pixcir_i2c_ts: Initialize interrupt mode and power mode

From: Roger Quadros
Date: Tue May 06 2014 - 04:31:57 EST


Dmitry,

On 05/06/2014 08:19 AM, Dmitry Torokhov wrote:
> Hi Roger,
>
> On Mon, May 05, 2014 at 12:04:33PM +0300, Roger Quadros wrote:
>> @@ -192,8 +364,8 @@ static int pixcir_i2c_ts_remove(struct i2c_client *client)
>>
>> device_init_wakeup(&client->dev, 0);
>>
>> - tsdata->exiting = true;
>> - mb();
>> + if (!tsdata->exiting)
>> + pixcir_stop(tsdata);
>>
>
> I think if we change tsdata->exiting to tsdata->running we won't have to
> do it here. Does the version of the patch below work for you?
>

The call to pixcir_stop() was not required in the original version as well. It seems
that the root of the problem for remove() and suspend() that I was trying to solve
was in the pixcir_stop() function. i.e. the order of mb() and synchronize_irq();

But I like your version more since "running" reflects the behaviour more accurately
than "exiting".

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/