From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavankumar Kondeti Subject: [PATCH 3/3] USB: OTG: msm: Fix bug in msm_otg_mode_write Date: Tue, 15 Feb 2011 09:42:35 +0530 Message-ID: <1297743155-2409-3-git-send-email-pkondeti@codeaurora.org> References: <1297743155-2409-1-git-send-email-pkondeti@codeaurora.org> Return-path: In-Reply-To: <1297743155-2409-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pavankumar Kondeti List-Id: linux-arm-msm@vger.kernel.org The driver private data is retrieved incorrectly which results a crash when written into "mode" debugfs file. Signed-off-by: Pavankumar Kondeti --- 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; -- 1.7.1 -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html