Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753094AbbGXFPm (ORCPT ); Fri, 24 Jul 2015 01:15:42 -0400 Received: from smtp1.cypress.com ([157.95.67.100]:44664 "EHLO smtp1.cypress.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752549AbbGXFPj (ORCPT ); Fri, 24 Jul 2015 01:15:39 -0400 From: Dudley Du To: dmitry.torokhov@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org Cc: Dudley Du , bleung@google.com, jmmahler@gmail.com, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] input: cyapa: fix output unwanted warning issue Date: Fri, 24 Jul 2015 13:05:59 +0800 Message-Id: <1437714359-2484-4-git-send-email-dudl@cypress.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437714359-2484-1-git-send-email-dudl@cypress.com> References: <1437714359-2484-1-git-send-email-dudl@cypress.com> MIME-Version: 1.0 X-Cypress-MailScanner-Information: Please contact the ISP for more information X-Cypress-MailScanner-ID: t6O56iuV027861 X-Cypress-MailScanner-From: dudl@cypress.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1728 Lines: 47 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 --- 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. --------------------------------------------------------------- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/