diff options
author | Mathias Nyman <mathias.nyman@nokia.com> | 2010-09-06 13:52:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-26 17:18:09 -0700 |
commit | 6c09969e0edfbc991387436eb011d5c7642b2b6a (patch) | |
tree | 932b4937452c2917683b9d6725a57108f6ee051a | |
parent | db49cf204b56e7f067063a4c47a704eaf9a381ed (diff) | |
download | kernel-crypto-6c09969e0edfbc991387436eb011d5c7642b2b6a.tar.gz kernel-crypto-6c09969e0edfbc991387436eb011d5c7642b2b6a.tar.xz kernel-crypto-6c09969e0edfbc991387436eb011d5c7642b2b6a.zip |
usb: musb_debugfs: don't use the struct file private_data field with seq_files
commit 024cfa5943a7e89565c60b612d698c2bfb3da66a upstream.
seq_files use the private_data field of a file struct for storing a seq_file structure,
data should be stored in seq_file's own private field (e.g. file->private_data->private)
Otherwise seq_release() will free the private data when the file is closed.
Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/musb/musb_debugfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c index c79a5e30d43..9e8639d4e86 100644 --- a/drivers/usb/musb/musb_debugfs.c +++ b/drivers/usb/musb/musb_debugfs.c @@ -195,15 +195,14 @@ static const struct file_operations musb_regdump_fops = { static int musb_test_mode_open(struct inode *inode, struct file *file) { - file->private_data = inode->i_private; - return single_open(file, musb_test_mode_show, inode->i_private); } static ssize_t musb_test_mode_write(struct file *file, const char __user *ubuf, size_t count, loff_t *ppos) { - struct musb *musb = file->private_data; + struct seq_file *s = file->private_data; + struct musb *musb = s->private; u8 test = 0; char buf[18]; |