Re: [PATCH] Input: wm831x-ts - Default pressure measurements on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark,

> tslib expects pressure measurements so enable them by default for better
> compatibility.
> 
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> ---

I cannot speak for the rationale of this patch, but logically,

>  drivers/input/touchscreen/wm831x-ts.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/wm831x-ts.c b/drivers/input/touchscreen/wm831x-ts.c
> index 3c397c8..560200d 100644
> --- a/drivers/input/touchscreen/wm831x-ts.c
> +++ b/drivers/input/touchscreen/wm831x-ts.c
> @@ -259,7 +259,10 @@ static __devinit int wm831x_ts_probe(struct platform_device *pdev)
>  	else
>  		wm831x_ts->pd_irq = platform_get_irq_byname(pdev, "TCHPD");
>  
> -	wm831x_ts->pressure = pdata && pdata->pressure;
> +	if (pdata)
> +		wm831x_ts->pressure = pdata->pressure;
> +	else
> +		wm831x_ts->pressure = true;

wm831x_ts->pressure = !pdata || pdata->pressure;

should suffice.

Henrik
--
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


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux