Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8981d76a authored by Shaohui Xie's avatar Shaohui Xie Committed by Greg Kroah-Hartman
Browse files

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: default avatarShaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 770f0baa
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -2480,8 +2480,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)


#ifndef CONFIG_ARCH_MXC
#ifndef CONFIG_ARCH_MXC
	if (pdata->have_sysif_regs)
	if (pdata->have_sysif_regs)
		usb_sys_regs = (struct usb_sys_interface *)
		usb_sys_regs = (void *)dr_regs + USB_DR_SYS_OFFSET;
				((u32)dr_regs + USB_DR_SYS_OFFSET);
#endif
#endif


	/* Initialize USB clocks */
	/* Initialize USB clocks */