]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/usb: fix type cast for address of ioremap to compatible with 64-bit
authorShaohui Xie <Shaohui.Xie@freescale.com>
Mon, 7 Nov 2011 08:58:20 +0000 (16:58 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Nov 2011 23:52:11 +0000 (15:52 -0800)
commit166d88bd61f71fe17bab3dd309a0330e43b77ac7
treefaaef63f5f82474a475baa105ad78ecd306a54fb
parenta3d0dff1bbe38e53fc1dc303c8719e0c669bda95
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>
drivers/usb/gadget/fsl_udc_core.c