powerpc/mpic_msgr: fix offset error when setting mer register
authorMingkai Hu <Mingkai.hu@freescale.com>
Mon, 16 Apr 2012 02:05:07 +0000 (10:05 +0800)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 19 Apr 2012 19:55:56 +0000 (14:55 -0500)
Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/sysdev/mpic_msgr.c

index dc1cfe380070009c0c17eb5c24626207a61741b4..483d8fa72e8ba3bc6bca736faf2f007399282e13 100644 (file)
@@ -228,7 +228,7 @@ static __devinit int mpic_msgr_probe(struct platform_device *dev)
 
                reg_number = block_number * MPIC_MSGR_REGISTERS_PER_BLOCK + i;
                msgr->base = msgr_block_addr + i * MPIC_MSGR_STRIDE;
-               msgr->mer = msgr->base + MPIC_MSGR_MER_OFFSET;
+               msgr->mer = (u32 *)((u8 *)msgr->base + MPIC_MSGR_MER_OFFSET);
                msgr->in_use = MSGR_FREE;
                msgr->num = i;
                raw_spin_lock_init(&msgr->lock);