RE: [PATCH] powerpc/usb: use ioremap instead of base plus offset to access regs
From: David Laight <hidden>
Date: 2011-11-02 09:08:16
From: David Laight <hidden>
Date: 2011-11-02 09:08:16
=20
#ifndef CONFIG_ARCH_MXC if (pdata->have_sysif_regs) - usb_sys_regs =3D (struct usb_sys_interface *) - ((u32)dr_regs + USB_DR_SYS_OFFSET); + usb_sys_regs =3D ioremap(res->start + USB_DR_SYS_OFFSET, + sizeof(struct
usb_sys_interface)/sizeof(int));
#endif
That ioremap() doesn't look right. Isn't the 'size' in bytes?? (Although it will only matter if it crosses a page boundary.) Mind you, I'd have though the original ioremap() should have covered the entire structure?? David