staging: mt7621-mmc: Correct datatypes for io and sanitize io access
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Tue, 24 Apr 2018 18:01:26 +0000 (20:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:36:19 +0000 (15:36 +0200)
commit0b78f05d510b01e353481f5bccb63661d2cb5c32
tree562f4115a687b74f6644c60bb01dad77a640bfe2
parent78f350830eb3b1b5c03c591f58b22110454556c5
staging: mt7621-mmc: Correct datatypes for io and sanitize io access

Current code discard the address space information on the base address
of the mmc controller, that causes sparse warnings. It uses the raw
read write function, that is correct for the mips architecture (little
endian), but for portability the non-raw function should be used. Also
the clear/set bit macros do direct memory access, that is also correct
for mips, but not portable.

So the type of the base address is changed to void __iomem *, that is
the type returned by the ioremap function. The set/clear bit macros
are changed to functions, that use the portable read and write
functions. The use of the raw access functions is changed to use the
non-raw ones.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/mt6575_sd.h
drivers/staging/mt7621-mmc/sd.c