HID: wiimote: fix ctx pointer in debugfs DRM-write
authorDavid Herrmann <dh.herrmann@gmail.com>
Sun, 5 May 2013 21:13:02 +0000 (23:13 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 3 Jun 2013 09:07:04 +0000 (11:07 +0200)
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 <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-wiimote-debug.c

index fdd30dd71ef8ebe3e38a7bd36f79df5122633f5a..0c0deaa23774d513aee7ba810bf5db06a63f4aa2 100644 (file)
@@ -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;