summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorShaohui Xie <Shaohui.Xie@freescale.com>2011-11-07 09:58:20 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-15 00:52:11 +0100
commit8981d76a2cf4c46333d9a18176a6eee337a71146 (patch)
treefaaef63f5f82474a475baa105ad78ecd306a54fb /drivers/usb
parentUSB: at91: at91-ohci: fix set/get power (diff)
downloadlinux-8981d76a2cf4c46333d9a18176a6eee337a71146.tar.xz
linux-8981d76a2cf4c46333d9a18176a6eee337a71146.zip
powerpc/usb: fix type cast for address of ioremap to compatible with 64-bit
Below are codes for accessing usb sysif_regs in driver: usb_sys_regs = (struct usb_sys_interface *) ((u32)dr_regs + USB_DR_SYS_OFFSET); these codes work in 32-bit, but in 64-bit, use u32 to type cast the address of ioremap is not right, and accessing members of 'usb_sys_regs' will cause call trace, so use (void *) for both 32-bit and 64-bit. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/fsl_udc_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index d786ba31fc07..b3b3d83b7c33 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2480,8 +2480,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
#ifndef CONFIG_ARCH_MXC
if (pdata->have_sysif_regs)
- usb_sys_regs = (struct usb_sys_interface *)
- ((u32)dr_regs + USB_DR_SYS_OFFSET);
+ usb_sys_regs = (void *)dr_regs + USB_DR_SYS_OFFSET;
#endif
/* Initialize USB clocks */