From patchwork Sun Aug 19 16:56:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bruno_Pr=C3=A9mont?= X-Patchwork-Id: 1344411 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 511053FC33 for ; Sun, 19 Aug 2012 16:57:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752742Ab2HSQ5R (ORCPT ); Sun, 19 Aug 2012 12:57:17 -0400 Received: from smtprelay.restena.lu ([158.64.1.62]:33248 "EHLO smtprelay.restena.lu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943Ab2HSQ5Q convert rfc822-to-8bit (ORCPT ); Sun, 19 Aug 2012 12:57:16 -0400 Received: from smtprelay.restena.lu (localhost [127.0.0.1]) by smtprelay.restena.lu (Postfix) with ESMTP id 959F810581; Sun, 19 Aug 2012 18:57:14 +0200 (CEST) Received: from neptune.home (unknown [IPv6:2001:a18:1:1402:2c0:9fff:fe2d:39d]) by smtprelay.restena.lu (Postfix) with ESMTP id 5EA4110580; Sun, 19 Aug 2012 18:57:14 +0200 (CEST) Date: Sun, 19 Aug 2012 18:56:31 +0200 From: Bruno =?UTF-8?B?UHLDqW1vbnQ=?= To: Jiri Kosina Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH 6/7 v2] HID: picoLCD: drop version check during probe Message-ID: <20120819185631.3a984aa4@neptune.home> In-Reply-To: References: <20120730213656.0a9f6d30@neptune.home> <20120730213859.063173c1@neptune.home> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 X-Virus-Scanned: ClamAV Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Commit 4ea5454203d991ec85264f64f89ca8855fce69b0 [HID: Fix race condition between driver core and ll-driver] introduced new locking around probe/remove functions that prevents any report/reply from hardware to reach driver until it returned from probe. As such, the ask-reply way to checking picoLCD firmware version during probe is bound to timeout and let probe fail. Drop the check to let driver successfully probe again (until locking issues are resolved allowing to reinstate the check). Signed-off-by: Bruno Prémont --- Changes since v1: - drop version check during probe instead of commenting it out. drivers/hid/hid-picolcd_core.c | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c index 7b566ee..e08ffd2 100644 --- a/drivers/hid/hid-picolcd_core.c +++ b/drivers/hid/hid-picolcd_core.c @@ -478,14 +478,6 @@ static int picolcd_probe_lcd(struct hid_device *hdev, struct picolcd_data *data) { int error; - error = picolcd_check_version(hdev); - if (error) - return error; - - if (data->version[0] != 0 && data->version[1] != 3) - hid_info(hdev, "Device with untested firmware revision, please submit /sys/kernel/debug/hid/%s/rdesc for this device.\n", - dev_name(&hdev->dev)); - /* Setup keypad input device */ error = picolcd_init_keys(data, picolcd_in_report(REPORT_KEY_STATE, hdev)); if (error) @@ -534,16 +526,6 @@ err: static int picolcd_probe_bootloader(struct hid_device *hdev, struct picolcd_data *data) { - int error; - - error = picolcd_check_version(hdev); - if (error) - return error; - - if (data->version[0] != 1 && data->version[1] != 0) - hid_info(hdev, "Device with untested bootloader revision, please submit /sys/kernel/debug/hid/%s/rdesc for this device.\n", - dev_name(&hdev->dev)); - picolcd_init_devfs(data, NULL, NULL, picolcd_out_report(REPORT_BL_READ_MEMORY, hdev), picolcd_out_report(REPORT_BL_WRITE_MEMORY, hdev), NULL);