From patchwork Fri Jul 29 22:04:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Sperling X-Patchwork-Id: 9252919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9780C601C0 for ; Fri, 29 Jul 2016 22:04:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87EBC283FE for ; Fri, 29 Jul 2016 22:04:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C3FF2841E; Fri, 29 Jul 2016 22:04:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B79CF283FE for ; Fri, 29 Jul 2016 22:04:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753156AbcG2WEt (ORCPT ); Fri, 29 Jul 2016 18:04:49 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34586 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752937AbcG2WEs (ORCPT ); Fri, 29 Jul 2016 18:04:48 -0400 Received: by mail-wm0-f66.google.com with SMTP id q128so17507583wma.1; Fri, 29 Jul 2016 15:04:47 -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=y3SqlqNM39fD+Z62LnfMQ/rFUv+YsbD+qjgs418k9YU=; b=ys3wJPQMWxouhda5WM8YBdaERgfEQY64RcyNIiKZkSmv4XcIUQ3Jbbt0CO1HPgBb/6 ay3KZJvrXOMw/DG9klei1tzdQ0kj+HZk+057mjZ/H8oGwovIx68bqxevymgtvgHx8BwD HpHgnAflIxrDC61kAWSeDiEZfkH3F1/SfoGJGigwstt1mdkiI1CK4j9D/qBMDsXQrS7A 7FXUthB/3lvvCZu19QBL1OXBpgFN2+U6u6uHxoZwomY7vZJoPWgfwl7A2x/YltXlYjkm 8JvCuRYt5ADzGwnZdUVbR6fb8UwMPGRi4LVnIDpr3dYFCD6r0dQwUU48rdeyVPy5W5y2 Nyqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=y3SqlqNM39fD+Z62LnfMQ/rFUv+YsbD+qjgs418k9YU=; b=MoxlnUOSBG3+C6TZtTsr1Pcvu9S72DWfE9dgWQVt5cw580k3zoNbjJhkzKnDwXM3Vs 9bO6x1fqQARqqz0BPrUi1wmyEak00k9eID9mjxhevDfwRIRih9L6lSWr3vaHufAn/6Jg F4HIyyE0eAndgkkG87cgnEwRlM3dWpPi0kRfIjWKkCpPmKa5Btee4pq5sUg23UN0QS51 Gxs8SxbDElKSBB96OaeOanRh+e8uLwvQ68fqMp8mxAHcVdHYc22dNzypIxC2EQHKb6Js ohn568VMaz5zYJldiyT0YChQq7jm77bMLTadpE8duO4WQpza/VRQCNwiVaT0SZmVhW7d o4Og== X-Gm-Message-State: AEkooutpRaI0ttkPw2GKApynIci1iFlAhiqVBx4sInMiLgE0KInBWMG6qhbh7Ita7n5hnQ== X-Received: by 10.194.67.198 with SMTP id p6mr40444793wjt.138.1469829886269; Fri, 29 Jul 2016 15:04:46 -0700 (PDT) Received: from leo-arch.Speedport_W723_V_Typ_A_1_01_016 (p2003007E8F63800112FEEDFFFEE7364A.dip0.t-ipconnect.de. [2003:7e:8f63:8001:12fe:edff:fee7:364a]) by smtp.gmail.com with ESMTPSA id h7sm18397500wjd.17.2016.07.29.15.04.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jul 2016 15:04:45 -0700 (PDT) From: Leo Sperling To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Leo Sperling Subject: [PATCH] Drivers: Input: Joystick: Fixed coding style issues Date: Sat, 30 Jul 2016 00:04:37 +0200 Message-Id: <20160729220437.19296-1-leosperling97@gmail.com> X-Mailer: git-send-email 2.9.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixed some coding style issues reported by checkpatch.pl. Mostly brackets in macros, spacing and comment style. Signed-off-by: Leo Sperling --- drivers/input/joystick/xpad.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index a529a45..37acf35 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -89,8 +89,10 @@ #define XPAD_PKT_LEN 64 -/* xbox d-pads should map to buttons, as is required for DDR pads - but we map them to axes when possible to simplify things */ +/* + * xbox d-pads should map to buttons, as is required for DDR pads + * but we map them to axes when possible to simplify things + */ #define MAP_DPAD_TO_BUTTONS (1 << 0) #define MAP_TRIGGERS_TO_BUTTONS (1 << 1) #define MAP_STICKS_TO_NULL (1 << 2) @@ -284,15 +286,15 @@ static const signed short xpad_abs_triggers[] = { * match against vendor id as well. Wired Xbox 360 devices have protocol 1, * wireless controllers have protocol 129. */ -#define XPAD_XBOX360_VENDOR_PROTOCOL(vend,pr) \ +#define XPAD_XBOX360_VENDOR_PROTOCOL(vend, pr) \ .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \ .idVendor = (vend), \ .bInterfaceClass = USB_CLASS_VENDOR_SPEC, \ .bInterfaceSubClass = 93, \ .bInterfaceProtocol = (pr) #define XPAD_XBOX360_VENDOR(vend) \ - { XPAD_XBOX360_VENDOR_PROTOCOL(vend,1) }, \ - { XPAD_XBOX360_VENDOR_PROTOCOL(vend,129) } + { XPAD_XBOX360_VENDOR_PROTOCOL((vend), 1) }, \ + { XPAD_XBOX360_VENDOR_PROTOCOL((vend), 129) } /* The Xbox One controller uses subclass 71 and protocol 208. */ #define XPAD_XBOXONE_VENDOR_PROTOCOL(vend, pr) \ @@ -302,7 +304,7 @@ static const signed short xpad_abs_triggers[] = { .bInterfaceSubClass = 71, \ .bInterfaceProtocol = (pr) #define XPAD_XBOXONE_VENDOR(vend) \ - { XPAD_XBOXONE_VENDOR_PROTOCOL(vend, 208) } + { XPAD_XBOXONE_VENDOR_PROTOCOL((vend), 208) } static struct usb_device_id xpad_table[] = { { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */ @@ -1297,6 +1299,7 @@ static void xpad_close(struct input_dev *dev) static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs) { struct usb_xpad *xpad = input_get_drvdata(input_dev); + set_bit(abs, input_dev->absbit); switch (abs) {