From patchwork Sat Apr 13 10:47:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2440451 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 848203FD1A for ; Sat, 13 Apr 2013 10:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753589Ab3DMKtA (ORCPT ); Sat, 13 Apr 2013 06:49:00 -0400 Received: from mail-ea0-f181.google.com ([209.85.215.181]:61335 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753371Ab3DMKs7 (ORCPT ); Sat, 13 Apr 2013 06:48:59 -0400 Received: by mail-ea0-f181.google.com with SMTP id z10so1591497ead.40 for ; Sat, 13 Apr 2013 03:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=VXG8ME4YgsZRfEsapfVQoCmNrvO8E+mW13kQA+ba+ms=; b=yQFL8XqSO8Gy0qldpxCiV4TUkE6M2CMvrkC/tbCS7739zU1AO4UeP/WPOM7csiMtO5 22/eIX9D/gv5s2cvC0y0w3MBycTJ2dTgHMxKSraRZaQHYODC9Kzb2J7wGIx/xk8euKwr lBTNRBX8j6itZ7cDr4PdEKy/2XdMWkjnCwRCiKeZ8Vp80SC5gh+vRgPs32cWJSYD0wBm JsYRALhYx7UspjFPkkMorFaAxvc4UkbiKlGTdTfLcMs1svinkIQcHoSiFsUwdEs/v9Pp 0svbs184fae9vRFPBPTIZWcbFLZk9FRvy4gKjL+z9EWwDwHAqzylRa3g6jWd6WREKx61 d9kw== X-Received: by 10.15.48.4 with SMTP id g4mr37973161eew.28.1365850138299; Sat, 13 Apr 2013 03:48:58 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71827d.pool.mediaWays.net. [95.113.130.125]) by mx.google.com with ESMTPS id t4sm15859796eel.0.2013.04.13.03.48.56 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Apr 2013 03:48:57 -0700 (PDT) From: David Herrmann To: linux-input@vger.kernel.org Cc: Jiri Kosina , David Herrmann Subject: [PATCH 18/21] HID: wiimote: fix ctx pointer in debugfs DRM-write Date: Sat, 13 Apr 2013 12:47:59 +0200 Message-Id: <1365850082-3585-19-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1365850082-3585-1-git-send-email-dh.herrmann@gmail.com> References: <1365850082-3585-1-git-send-email-dh.herrmann@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org single_open() stores the seq_file pointer in file->private_data. It stores our ctx pointer in seq_file->private. Signed-off-by: David Herrmann --- drivers/hid/hid-wiimote-debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-wiimote-debug.c b/drivers/hid/hid-wiimote-debug.c index fdd30dd..0c0deaa 100644 --- a/drivers/hid/hid-wiimote-debug.c +++ b/drivers/hid/hid-wiimote-debug.c @@ -127,7 +127,8 @@ static int wiidebug_drm_open(struct inode *i, struct file *f) static ssize_t wiidebug_drm_write(struct file *f, const char __user *u, size_t s, loff_t *off) { - struct wiimote_debug *dbg = f->private_data; + struct seq_file *sf = f->private_data; + struct wiimote_debug *dbg = sf->private; unsigned long flags; char buf[16]; ssize_t len;