Re: [PATCH] Input: wm831x-ts - Default pressure measurements on
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2011-03-13 06:28:27
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2011-03-13 06:28:27
On Wed, Mar 09, 2011 at 03:40:18PM +0100, Henrik Rydberg wrote:
On Wed, Mar 09, 2011 at 02:28:13PM +0000, Mark Brown wrote:quoted
On Wed, Mar 09, 2011 at 03:11:39PM +0100, Henrik Rydberg wrote:quoted
quoted
- wm831x_ts->pressure = pdata && pdata->pressure; + if (pdata) + wm831x_ts->pressure = pdata->pressure; + else + wm831x_ts->pressure = true;quoted
wm831x_ts->pressure = !pdata || pdata->pressure;quoted
should suffice.It does have some substantial drawbacks in terms of legibility, though.I suppose that is in the eye of the beholder.
Applied, thanks Mark (even though I also prefer more concise variants). -- Dmitry