Message ID | 1437714359-2484-4-git-send-email-dudl@cypress.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jul 24, 2015 at 01:05:59PM +0800, Dudley Du wrote: > Avoid the driver generate warning message when the cyapa driver working > with the old Gen5 trackpad device which does not support the proximity function. > Those old Gen5 trackpad device all have the platform version less than 2. > > Signed-off-by: Dudley Du <dudl@cypress.com> Applied, thank you. > --- > drivers/input/mouse/cyapa_gen5.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/input/mouse/cyapa_gen5.c b/drivers/input/mouse/cyapa_gen5.c > index 6d7abbe..118ba97 100644 > --- a/drivers/input/mouse/cyapa_gen5.c > +++ b/drivers/input/mouse/cyapa_gen5.c > @@ -2519,10 +2519,13 @@ static int cyapa_gen5_do_operational_check(struct cyapa *cyapa) > __func__); > > /* By default, the trackpad proximity function is enabled. */ > - error = cyapa_pip_set_proximity(cyapa, true); > - if (error) > - dev_warn(dev, "%s: failed to enable proximity.\n", > - __func__); > + if (cyapa->platform_ver >= 2) { > + error = cyapa_pip_set_proximity(cyapa, true); > + if (error) > + dev_warn(dev, > + "%s: failed to enable proximity.\n", > + __func__); > + } > > /* Get trackpad product information. */ > error = cyapa_gen5_get_query_data(cyapa); > -- > 1.9.1 > > > --------------------------------------------------------------- > This message and any attachments may contain Cypress (or its > subsidiaries) confidential information. If it has been received > in error, please advise the sender and immediately delete this > message. > --------------------------------------------------------------- >
diff --git a/drivers/input/mouse/cyapa_gen5.c b/drivers/input/mouse/cyapa_gen5.c index 6d7abbe..118ba97 100644 --- a/drivers/input/mouse/cyapa_gen5.c +++ b/drivers/input/mouse/cyapa_gen5.c @@ -2519,10 +2519,13 @@ static int cyapa_gen5_do_operational_check(struct cyapa *cyapa) __func__); /* By default, the trackpad proximity function is enabled. */ - error = cyapa_pip_set_proximity(cyapa, true); - if (error) - dev_warn(dev, "%s: failed to enable proximity.\n", - __func__); + if (cyapa->platform_ver >= 2) { + error = cyapa_pip_set_proximity(cyapa, true); + if (error) + dev_warn(dev, + "%s: failed to enable proximity.\n", + __func__); + } /* Get trackpad product information. */ error = cyapa_gen5_get_query_data(cyapa);
Avoid the driver generate warning message when the cyapa driver working with the old Gen5 trackpad device which does not support the proximity function. Those old Gen5 trackpad device all have the platform version less than 2. Signed-off-by: Dudley Du <dudl@cypress.com> --- drivers/input/mouse/cyapa_gen5.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)