Commit e2904ee4 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Greg Kroah-Hartman

USB: OTG: msm: Fix bug in msm_otg_mode_write

The driver private data is retrieved incorrectly which results
a crash when written into "mode" debugfs file.
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7018773a
...@@ -723,7 +723,8 @@ static int msm_otg_mode_open(struct inode *inode, struct file *file) ...@@ -723,7 +723,8 @@ static int msm_otg_mode_open(struct inode *inode, struct file *file)
static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf, static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct msm_otg *motg = file->private_data; struct seq_file *s = file->private_data;
struct msm_otg *motg = s->private;
char buf[16]; char buf[16];
struct otg_transceiver *otg = &motg->otg; struct otg_transceiver *otg = &motg->otg;
int status = count; int status = count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment