]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/83xx: Use sizeof correct type when ioremapping
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 28 Jun 2017 11:49:07 +0000 (14:49 +0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Aug 2017 04:26:05 +0000 (14:26 +1000)
commitd3015bfd5f85b9fa92f9887bee235feecb589bb2
treed6965019fd231ec5276709bb084aed8b90e89b17
parent4f1bd7f6d6610994c514bd994d4e8b5768b80e3c
powerpc/83xx: Use sizeof correct type when ioremapping

There is a cut and paste error here so we use sizeof(struct mpc83xx_pmc)
to remap the memory for "clock_regs". That sizeof() is 20 bytes and we
only need to remap 12 bytes. It presumably doesn't affect run time too
much...

I changed them to both use sizeof(*variable_name) because that's the
preferred kernel style these days.

Fixes: e642c9f57caf ("powerpc/mpc83xx: Power Management support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[mpe: It will map at least one page anyway, but still a good cleanup]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/83xx/suspend.c