From patchwork Mon Sep 2 12:00:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2852834 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 55024C0AB5 for ; Mon, 2 Sep 2013 12:00:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAFBA203AF for ; Mon, 2 Sep 2013 12:00:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11B5D20362 for ; Mon, 2 Sep 2013 12:00:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757934Ab3IBMAY (ORCPT ); Mon, 2 Sep 2013 08:00:24 -0400 Received: from mail-ee0-f41.google.com ([74.125.83.41]:53043 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757929Ab3IBMAX (ORCPT ); Mon, 2 Sep 2013 08:00:23 -0400 Received: by mail-ee0-f41.google.com with SMTP id d17so2319409eek.14 for ; Mon, 02 Sep 2013 05:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=S2xgPMAGJUKt7nexPgzJ3Yy/FtCsywkni70MtPqf7jI=; b=KhR1LGwFBX2HPknAIQ+Lw77Hl9nOCrtxP1pw77JlW+Z6SjdhK87vEhy9XVxsx30x74 vYEPg9VG6+Wx9h2EqFR7oZjXosRGQ7iACVVFeBdWIT9fMvbbqQKwZjc/uZc3qT31t55L 7lGGiggAY8a7A8/ec/dfWiPZxQ97+ABhcioh4Qb8jX2Vofxlc8PNVy9fTWhlWYh+SqgZ WAByavsYFFab3Zp7KL4j+dPeC8dRJsiG1DdQjnY9Nz++ZAtI4iJhBIQ+MdSUtmMRGLoF kIOOjABYqLGbqGUy+hhU9MXhKCw88Q6dMXwQTn4LS2tYOUL8JJfxIt3rembQ+rM1iXS+ 3Z0g== X-Received: by 10.15.43.13 with SMTP id w13mr36596755eev.37.1378123222413; Mon, 02 Sep 2013 05:00:22 -0700 (PDT) Received: from localhost.localdomain (stgt-5f7182a8.pool.mediaWays.net. [95.113.130.168]) by mx.google.com with ESMTPSA id a43sm21537758eep.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Sep 2013 05:00:21 -0700 (PDT) From: David Herrmann To: linux-input@vger.kernel.org Cc: Jiri Kosina , David Herrmann Subject: [PATCH] HID: move HID_REPORT_TYPES closer to the report-definitions Date: Mon, 2 Sep 2013 14:00:05 +0200 Message-Id: <1378123205-4032-1-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HID_REPORT_TYPES defines the number of available report-types. Move it closer to the actualy definition of the report-types so we can see the relation more clearly (and hopefully will never forget to update it). Signed-off-by: David Herrmann --- include/linux/hid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/hid.h b/include/linux/hid.h index 650dc29..383b9d6 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -252,6 +252,8 @@ struct hid_item { #define HID_OUTPUT_REPORT 1 #define HID_FEATURE_REPORT 2 +#define HID_REPORT_TYPES 3 + /* * HID connect requests */ @@ -401,8 +403,6 @@ struct hid_report_enum { struct hid_report *report_id_hash[256]; }; -#define HID_REPORT_TYPES 3 - #define HID_MIN_BUFFER_SIZE 64 /* make sure there is at least a packet size of space */ #define HID_MAX_BUFFER_SIZE 4096 /* 4kb */ #define HID_CONTROL_FIFO_SIZE 256 /* to init devices with >100 reports */