From patchwork Tue Sep 21 06:51:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Waters X-Patchwork-Id: 196562 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8L6psDF020430 for ; Tue, 21 Sep 2010 06:51:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755521Ab0IUGvt (ORCPT ); Tue, 21 Sep 2010 02:51:49 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:56050 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755497Ab0IUGvs (ORCPT ); Tue, 21 Sep 2010 02:51:48 -0400 Received: by pvg2 with SMTP id 2so1339548pvg.19 for ; Mon, 20 Sep 2010 23:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=rzpGE3WShSk6pjFUXhlqNbCK7A+NS4HKJeObFPHfdls=; b=xnDC7B/JEERwIWf0zA+yFqwonnF2mTcvtZ5mvxbTGh6s5ZQ5Rp/ScEnUMF6bw4IRRi +rd7F/xF8aaq9fT8P64A+gckjHsl2ar+CXUKZA7iD+z7zy0EWtTVG8b+zdTxiydPJEH/ D67amKrnvYxlt4d7yLk+Zd9FUHGaLnHpsZwSU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=MXs3NLsEnWRt21dqEXKGW+5vUQXYWX7NSyMX5t8yvQnkpDtWJImt0ooOaNnokPTeep fTPVaxMROT+FxXCpvuk9+QBRA3lJg+CDWWxdal5DjxIPvhWDxXtq5vRR7Jt/gvZEns3f CLqNcePMAVNKKo1Kpz4/VEG0up0c6I+D62Uyw= Received: by 10.143.32.1 with SMTP id k1mr432111wfj.81.1285051908280; Mon, 20 Sep 2010 23:51:48 -0700 (PDT) Received: from localhost.localdomain (adsl-68-127-156-132.dsl.pltn13.pacbell.net [68.127.156.132]) by mx.google.com with ESMTPS id d10sm7461743wfe.10.2010.09.20.23.51.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 20 Sep 2010 23:51:46 -0700 (PDT) From: Kenneth Waters To: dmitry.torokhov@gmail.com Cc: steve@sk2.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Kenneth Waters Subject: [PATCH] input: joydev: Fix JSIOCSAXMAP ioctl. Date: Mon, 20 Sep 2010 23:51:25 -0700 Message-Id: <1285051885-20417-1-git-send-email-kwwaters@gmail.com> X-Mailer: git-send-email 1.7.2.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Sep 2010 06:51:55 +0000 (UTC) diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index d85bd8a..22239e9 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -483,6 +483,9 @@ static int joydev_handle_JSIOCSAXMAP(struct joydev *joydev, memcpy(joydev->abspam, abspam, len); + for (i = 0; i < joydev->nabs; i++) + joydev->absmap[joydev->abspam[i]] = i; + out: kfree(abspam); return retval;