From patchwork Fri Jan 23 17:21:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Keir X-Patchwork-Id: 5697061 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DEB79C058D for ; Fri, 23 Jan 2015 17:32:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12B5A201EC for ; Fri, 23 Jan 2015 17:32:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3DBFD201DD for ; Fri, 23 Jan 2015 17:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753440AbbAWRcI (ORCPT ); Fri, 23 Jan 2015 12:32:08 -0500 Received: from a8-21.smtp-out.amazonses.com ([54.240.8.21]:34182 "EHLO a8-21.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbbAWRb7 (ORCPT ); Fri, 23 Jan 2015 12:31:59 -0500 X-Greylist: delayed 350 seconds by postgrey-1.27 at vger.kernel.org; Fri, 23 Jan 2015 12:31:59 EST DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1422033673; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=ZhtYaw6psmfi0opspmGS7INEAMApqPjgQNEKcfoCHF8=; b=TPaqhMEflPZ2NEDMO+r6UyUEUI2gT0g0uL/L+KmJXmNNTVJ0qFtG/eYmIVO9sdcQ 4GG8ajHscB5dX75fhzqzu+xhVSYe5IqVjW9bRTVkMKfV62W4TyQ6sHQbdt3/PdUYPGj HAp/QjOGyRaLMVDoJ5QkBb1cTi7Z5ES5lvYlRDcA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=wskikwaygy6dq7o6mewsvwbivuod352d; d=oracledbadirect.com; t=1422033673; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=ZhtYaw6psmfi0opspmGS7INEAMApqPjgQNEKcfoCHF8=; b=HxVwla+/AGiwx6RgkLXdDowuh4j5zJtuWpLTfxPvfLQ6UNzY7pmvdzm90QxNXg2A y8wON9AbzVG0wrkERsqrVmiBvbyO/8yL4a+37WRdrVCBr7Drw3Dt7gPhywp7hNmKXLL 8EZYRuWjMlRNycFbBXM6OktmuABpGt0Mk7QCk8FY= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 From: Jim Keir To: linux-input@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, jkosina@suse.cz Cc: Jim Keir Subject: [PATCH 2/2] Fix force effect modifications for the Microsoft Sidewinder Force Feedback Pro 2 joystick Date: Fri, 23 Jan 2015 17:21:13 +0000 Message-ID: <0000014b17cfde4d-df42e887-9524-4f07-a46b-5d81f01fc687-000000@email.amazonses.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422033640-4104-1-git-send-email-jimkeir@oracledbadirect.com> References: <1422033640-4104-1-git-send-email-jimkeir@oracledbadirect.com> X-SES-Outgoing: 2015.01.23-54.240.8.21 Feedback-ID: us-east-1.amlta2VpckBvcmFjbGVkYmFkaXJlY3QuY29t:AmazonSES 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 --- Hi, Changes from previous patches: - All changes removed from higher-level files - Extra debug line removed Signed-off-by: Jim Keir drivers/hid/usbhid/hid-pidff.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index 0b531c6..1b3fa70 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -568,6 +568,12 @@ static int pidff_upload_effect(struct input_dev *dev, struct ff_effect *effect, int type_id; int error; + pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; + if (old && effect) { + pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = + pidff->pid_id[effect->id]; + } + switch (effect->type) { case FF_CONSTANT: if (!old) {