From patchwork Thu Sep 13 22:15:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 1454471 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@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 BB5993FE79 for ; Thu, 13 Sep 2012 22:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752753Ab2IMWPm (ORCPT ); Thu, 13 Sep 2012 18:15:42 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]:62643 "EHLO mail-oa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752023Ab2IMWPm (ORCPT ); Thu, 13 Sep 2012 18:15:42 -0400 Received: by oago6 with SMTP id o6so2341444oag.19 for ; Thu, 13 Sep 2012 15:15:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type:x-mailer :content-transfer-encoding:mime-version; bh=TXs4uTrgiuAzAeuhac1aZ6XsTMHXjPUEca7PAo3KKcI=; b=yK4w2+BRxJ3kJUgIxnkEHTToezgvJV+LsWOmGavGVDlqsV+INEBr8RFsGSVTiN+z2+ 9H4sFcZBeSKGtOWGdpWyNcmNADaiRZQMmUFwsyQUA0lubqJSuSeuCLIYMIE5RBGg5Li6 Mq4QlYKvGYqejw/8DTSdL/pWYd9C5yDxTh0xHwAdNG01reyN+fIFrUc8MZrcsU4ZhPz9 aet87Rt+ZxywxhVZ3ZUrKRaOLoeIOugtMJARO2nUEORw0B3Va4NH+QGVkt5/JRdAh4dd U6FKd2dPRB6I5gDuwVD0ecx16qbxGUsqIwcAvdtm2+BssPbafCxuLqTZj8OWMYmZetpP SBFA== Received: by 10.182.180.39 with SMTP id dl7mr826685obc.40.1347574541400; Thu, 13 Sep 2012 15:15:41 -0700 (PDT) Received: from [114.39.100.174] (114-39-100-174.dynamic.hinet.net. [114.39.100.174]) by mx.google.com with ESMTPS id e9sm20586122oee.12.2012.09.13.15.15.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Sep 2012 15:15:40 -0700 (PDT) Message-ID: <1347574536.8974.8.camel@phoenix> Subject: [PATCH] HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start() From: Axel Lin To: Jiri Kosina Cc: Bruno =?ISO-8859-1?Q?Pr=E9mont?= , linux-input@vger.kernel.org Date: Fri, 14 Sep 2012 06:15:36 +0800 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Current implementation of hid_hw_start() allows connect_mask to be 0. Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start() is not necessary. Remove it. Signed-off-by: Axel Lin Acked-By: Bruno Prémont --- drivers/hid/hid-picolcd_core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c index 8c9ec1f..e30e703 100644 --- a/drivers/hid/hid-picolcd_core.c +++ b/drivers/hid/hid-picolcd_core.c @@ -583,11 +583,7 @@ static int picolcd_probe(struct hid_device *hdev, goto err_cleanup_data; } - /* We don't use hidinput but hid_hw_start() fails if nothing is - * claimed. So spoof claimed input. */ - hdev->claimed = HID_CLAIMED_INPUT; error = hid_hw_start(hdev, 0); - hdev->claimed = 0; if (error) { hid_err(hdev, "hardware start failed\n"); goto err_cleanup_data;