Skip to content

Commit

Permalink
HID: wiimote: fix ctx pointer in debugfs DRM-write
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Herrmann authored and Jiri Kosina committed Jun 3, 2013
1 parent 34472d3 commit 51103c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hid/hid-wiimote-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 51103c7

Please sign in to comment.