From patchwork Sun May 5 21:13:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2521511 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 EC56E3FD4E for ; Sun, 5 May 2013 21:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752270Ab3EEVOO (ORCPT ); Sun, 5 May 2013 17:14:14 -0400 Received: from mail-bk0-f53.google.com ([209.85.214.53]:49334 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267Ab3EEVON (ORCPT ); Sun, 5 May 2013 17:14:13 -0400 Received: by mail-bk0-f53.google.com with SMTP id i18so1359438bkv.12 for ; Sun, 05 May 2013 14:14:12 -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=l7Hq1GuMdw3LhdjQ0X+wYhPepTSDjhJ8pTtRuPmwIyo=; b=Ck7OsL9PvmX8I+sfZuNjApGA7PLzof8k5ao5QQzjnudZarYtw5gW4oC+Kbq41IE9LZ pg0+9rHfbZw0fJxPgWO/7CCKEjURWORe7Ino9PdiAu0ZOzzL0HPG/mDqmGVw2AUCQaHg 2aKDVth9IDTdztDr7cckLYSSF9WpOXhQE3gWXWczi9q4WNEBBMRvTDMIzpHzqOHNUOd3 eHZhlYXHIlsOEUW2aRDAGfqZHXJnqnZtLAD5EsibLEtuyBc8ao5YoacO57z0iTKIE4cj w0m+Gzg16J0rOiK2hJL7t35hq/HJNWidrurPl1rdVk2xlc4MTWrDf+AuNDQs7fQDl+vR J1TA== X-Received: by 10.204.173.9 with SMTP id n9mr7347349bkz.47.1367788452195; Sun, 05 May 2013 14:14:12 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71a35b.pool.mediaWays.net. [95.113.163.91]) by mx.google.com with ESMTPSA id cv9sm4667233bkb.5.2013.05.05.14.14.10 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 May 2013 14:14:11 -0700 (PDT) From: David Herrmann To: linux-input@vger.kernel.org Cc: Jiri Kosina , David Herrmann Subject: [PATCH 18/26] HID: wiimote: fix ctx pointer in debugfs DRM-write Date: Sun, 5 May 2013 23:13:02 +0200 Message-Id: <1367788390-29835-19-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.2.2 In-Reply-To: <1367788390-29835-1-git-send-email-dh.herrmann@gmail.com> References: <1367788390-29835-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;