From patchwork Fri May 27 00:12:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Rojtberg X-Patchwork-Id: 9137485 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 14E8F607D3 for ; Fri, 27 May 2016 00:13:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0510E28300 for ; Fri, 27 May 2016 00:13:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE57128303; Fri, 27 May 2016 00:13:20 +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 2EEFA282E1 for ; Fri, 27 May 2016 00:13:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755162AbcE0ANM (ORCPT ); Thu, 26 May 2016 20:13:12 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35761 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755336AbcE0ANL (ORCPT ); Thu, 26 May 2016 20:13:11 -0400 Received: by mail-wm0-f65.google.com with SMTP id e3so9942604wme.2 for ; Thu, 26 May 2016 17:13:11 -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:in-reply-to:references; bh=ASfIS7kvxuVMxW0Cf6OPBq2m6r494nz27EqdJ6ESsKg=; b=chTQ7132y965I7inYU9/4I8/PLwimoakflYCYGurHXCSgFb9BTyZ4ZNYjNBdn4ig2B MOKgOVA66soAuw/neSMUgH5nOcRA1oq+ox7RUy5Y5i6YF1v+K6NWDzSt9BVU86NX7r+h u3FbKVRS09ctmmvWhtrrPFOG43a8XUn4STexTzazIru2yPLyf334d0MBBjLE00vHXDDc 89rMtfFWI3oM7lsGluUtfRcVoQLGb9SxPsX9gJ60IUyopnn61+MvTEL7J0+slkjhoE11 68UkdHi3ep+JzRN9nKrVzi6UuhB9SfXN4wgFF6NrQtVe9rnp1jpIMm3MKNp+4bJmeznL yknQ== 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:in-reply-to :references; bh=ASfIS7kvxuVMxW0Cf6OPBq2m6r494nz27EqdJ6ESsKg=; b=drjiezCmdCGxpXqV9zSl2KfPQrXl3B/AB0cDXrOMi4dhsQICayiuWccjdFk/0J/zkJ ylyq6UEI40Z58AEOL3QkTHv1Nb2ORCW5yg9uLzGECKpMhEgCiGmqJ79rf+8S2m4gv/To Zth2gPLFOTtsho5Y/4sceAmF1wtnvpm1LYTP/ra4PqzMKzz0Kx6lQCBSq6fvmrJbagg5 xGAUmtwmxb8tR0P4cJ1Kauq+YgjmddHkwlB5fojUzMGJJLGDRHGvdH28j+QIilPMzLzQ gaQmYppGCog8v+lfHotdFJuf+1gxHk/ArtFW0kNknQ8oBYOjpV7QqmLctCesgXK7x4qs ONig== X-Gm-Message-State: ALyK8tJFI7l/XU8wvE0oDJsZhAaQa/70RQrAdOrpoPKnWxadbP+I8wKVS7zUpTCdejzm8w== X-Received: by 10.28.30.16 with SMTP id e16mr5932163wme.20.1464307990223; Thu, 26 May 2016 17:13:10 -0700 (PDT) Received: from deepwhite.fritz.box (p5790B7FB.dip0.t-ipconnect.de. [87.144.183.251]) by smtp.gmail.com with ESMTPSA id kz1sm16628372wjc.46.2016.05.26.17.13.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 May 2016 17:13:09 -0700 (PDT) From: Pavel Rojtberg X-Google-Original-From: Pavel Rojtberg < rojtberg@gmail.com > To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Cc: Pavel Rojtberg Subject: [PATCH 1/7] Input: xpad: move pending clear to the correct location Date: Fri, 27 May 2016 02:12:49 +0200 Message-Id: <1464307975-25890-2-git-send-email-rojtberg@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464307975-25890-1-git-send-email-rojtberg@gmail.com> References: <1464307975-25890-1-git-send-email-rojtberg@gmail.com> 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 From: Pavel Rojtberg otherwise we lose ff commands: https://github.com/paroj/xpad/issues/27 Signed-off-by: Pavel Rojtberg --- drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 1142a93..39cc52f 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -756,6 +756,7 @@ static bool xpad_prepare_next_out_packet(struct usb_xpad *xpad) if (packet) { memcpy(xpad->odata, packet->data, packet->len); xpad->irq_out->transfer_buffer_length = packet->len; + packet->pending = false; return true; } @@ -797,7 +798,6 @@ static void xpad_irq_out(struct urb *urb) switch (status) { case 0: /* success */ - xpad->out_packets[xpad->last_out_packet].pending = false; xpad->irq_out_active = xpad_prepare_next_out_packet(xpad); break;