From patchwork Thu Sep 13 22:03:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 1454361 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C1342DF24C for ; Thu, 13 Sep 2012 22:03:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755518Ab2IMWDg (ORCPT ); Thu, 13 Sep 2012 18:03:36 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:46602 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753238Ab2IMWDf (ORCPT ); Thu, 13 Sep 2012 18:03:35 -0400 Received: by obbuo13 with SMTP id uo13so5326196obb.19 for ; Thu, 13 Sep 2012 15:03:34 -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=EuMYX16rVSUdQX2O9TPaouhcZfdqJxEtmztxEWviGG37cg7H5PR4nQVpjGBTgwslCc SB9tCc3R+71HqpW5+ebsGQSwtda0TlP31vJGdZYcjn55JaTVSpBtjZnL2CuyxntvmteZ z8CcWIvFROs6yG07PwIUcbrxrnmcuNmGjNVQW37NjqAOCuODkPRDVwod/16N97qPnk8b lq9rai24Ul7GXzeKiKzvxGimLlC7Ta6lOKylHIk28e07wEsTzLi8MtaOjCZpD+2gXRlI HSU+DrCxX8I4ArQhTIvQ+XrPxjpU4exjIfQK/2AGDkG6Dii9TI/JquITRYdb99jESj9z Wo0Q== Received: by 10.182.174.9 with SMTP id bo9mr871383obc.19.1347573814666; Thu, 13 Sep 2012 15:03:34 -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 i2sm25276798obn.19.2012.09.13.15.03.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Sep 2012 15:03:34 -0700 (PDT) Message-ID: <1347573801.8974.2.camel@phoenix> Subject: [PATCH 1/3] HID: hid-sensor-hub: Remove setting hdev->claimed before calling hid_hw_start() From: Axel Lin To: Jiri Kosina Cc: srinivas pandruvada , Jonathan Cameron , linux-input@vger.kernel.org Date: Fri, 14 Sep 2012 06:03:21 +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 --- 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);