From patchwork Tue Sep 18 00:52:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 1470101 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 E526A3FE79 for ; Tue, 18 Sep 2012 00:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756649Ab2IRAwY (ORCPT ); Mon, 17 Sep 2012 20:52:24 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:59443 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755834Ab2IRAwX (ORCPT ); Mon, 17 Sep 2012 20:52:23 -0400 Received: by obbuo13 with SMTP id uo13so9762405obb.19 for ; Mon, 17 Sep 2012 17:52:22 -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=tI5RbGrFHZBnV2+gDIvy28NB15ybxCFsmqgcCfRlQAc=; b=cg6E8oDJYBD1qYP/bjL+DHHf1VdJQ2rWCSaNEKzmu3rkeiHIOvqj77NjyTYD8XvMTP LsBjgTCWFQ1+aCS6nHi0LyWebfyWSRnSWQnQ9/6xNUda3BAiHh9Wu3q1iD59OYc33rcA qN6kaPd+DRN7Dq+vWKWzEL5+ZK5FsKifJQEq8h3qWmDz3tnQuwtTTF/LSXHghV69s/xP Yj3HtrAlaqLnaF7fcnW623TJ6MwHmRCccsUxNt1AAv4BHiVrtfRDwtxsexS42sv/F+Ng MN/v+sTImCU8IJonqoXi2ZjaG82dXBakgam4YsFqYb5RwfG5ivRkvrClAS88K0YU4RHD 56Iw== Received: by 10.182.51.65 with SMTP id i1mr13613537obo.45.1347929542827; Mon, 17 Sep 2012 17:52:22 -0700 (PDT) Received: from [114.39.107.123] (114-39-107-123.dynamic.hinet.net. [114.39.107.123]) by mx.google.com with ESMTPS id i2sm12525777obn.19.2012.09.17.17.52.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Sep 2012 17:52:22 -0700 (PDT) Message-ID: <1347929533.6562.0.camel@phoenix> Subject: [PATCH RESEND 1/2] HID: hid-sensor-hub: Remove setting hdev->claimed before calling hid_hw_start() From: Axel Lin To: Jonathan Cameron Cc: Jiri Kosina , Srinivas Pandruvada , linux-input@vger.kernel.org Date: Tue, 18 Sep 2012 08:52:13 +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 Signed-off-by: Jiri Kosina Signed-off-by: Jiri Kosina --- drivers/hid/hid-sensor-hub.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 4ac759c..1faacf2 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -539,7 +539,6 @@ static int sensor_hub_probe(struct hid_device *hdev, } INIT_LIST_HEAD(&hdev->inputs); - hdev->claimed = HID_CLAIMED_INPUT; ret = hid_hw_start(hdev, 0); if (ret) { hid_err(hdev, "hw start failed\n"); @@ -627,7 +626,6 @@ static void sensor_hub_remove(struct hid_device *hdev) int i; hid_dbg(hdev, " hardware removed\n"); - hdev->claimed &= ~HID_CLAIMED_INPUT; hid_hw_stop(hdev); hid_hw_close(hdev); spin_lock_irqsave(&data->lock, flags);