diff options
author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2011-02-15 09:42:35 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 10:55:15 -0800 |
commit | e2904ee43c7009e6c4fc18738f15051312f22483 (patch) | |
tree | debafb5c4f9bb237423c9dc92fb907221a80b7ae /drivers/usb/otg | |
parent | 7018773aca1b46e4f29a8be2c6652448eb603099 (diff) | |
download | kernel_samsung_aries-e2904ee43c7009e6c4fc18738f15051312f22483.zip kernel_samsung_aries-e2904ee43c7009e6c4fc18738f15051312f22483.tar.gz kernel_samsung_aries-e2904ee43c7009e6c4fc18738f15051312f22483.tar.bz2 |
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: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r-- | drivers/usb/otg/msm72k_otg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/otg/msm72k_otg.c b/drivers/usb/otg/msm72k_otg.c index 4d79017..2965986 100644 --- a/drivers/usb/otg/msm72k_otg.c +++ b/drivers/usb/otg/msm72k_otg.c @@ -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, 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]; struct otg_transceiver *otg = &motg->otg; int status = count; |