spi: spi-ep93xx: use read,write instead of __raw_* variants
PATCH v2 2/11 spi: spi-ep93xx: use read,write instead of __raw_* variants
The memory resource used by this driver is ioremap()'d and the normal read,write calls can be used instead of the __raw_* variants.
Also, remove the inline tag on the helper functions and let the compiler decide if they are inlined.
Signed-off-by H Hartley Sweeten <[email protected]>
Cc Ryan Mallon <[email protected]>
Cc Mika Westerberg <[email protected]>
Cc Mark Brown <[email protected]>
Cc Grant Likely <[email protected]>
--- drivers/spi/spi-ep93xx.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-)
drivers/spi/spi-ep93xx.c +10 -12
@@ -158,28 +158,26 @@ struct ep93xx_spi_chip {/* converts bits per word to CR0.DSS value */ #define bits_per_word_to_dss (bpw) ((bpw) - 1) -static inline void -ep93xx_spi_write_u8 (const struct ep93xx_spi *espi,u16 reg,u8 value) +static void ep93xx_spi_write_u8 (const struct ep93xx_spi *espi, +u16 reg,u8 value) { -__raw_writeb (value, espi->regs_base + reg); +writeb (value, espi->regs_base + reg); } -static inline u8 -ep93xx_spi_read_u8 (const struct ep93xx_spi *spi,u16 reg) +static u8 ep93xx_spi_read_u8 (const struct ep93xx_spi *spi,u16 reg) { -return __raw_readb (spi->regs_base + reg); +return readb (spi->regs_base + reg); } -static inline void -ep93xx_spi_write_u16 (const struct ep93xx_spi *espi,u16 reg,u16 value) +static void ep93xx_spi_write_u16 (const struct ep93xx_spi *espi, +u16 reg,u16 value) { -__raw_writew (value, espi->regs_base + reg); +writew (value, espi->regs_base + reg); } -static inline u16 -ep93xx_spi_read_u16 (const struct ep93xx_spi *spi,u16 reg) +static u16 ep93xx_spi_read_u16 (const struct ep93xx_spi *spi,u16 reg) { -return __raw_readw (spi->regs_base + reg); +return readw (spi->regs_base + reg); }static int ep93xx_spi_enable (const struct ep93xx_spi *espi)
Signature · 1 line
1.8.1.4
Quoted 9 lines · H Hartley Sweeten
The memory resource used by this driver is ioremap()'d and the normal read,write calls can be used instead of the __raw_* variants.
Also, remove the inline tag on the helper functions and let the compiler decide if they are inlined.
Signed-off-by H Hartley Sweeten <[email protected]>Cc Ryan Mallon <[email protected]>Cc Mika Westerberg <[email protected]>
Acked-by Mika Westerberg <[email protected]>
Quoted 2 lines · H Hartley Sweeten
The memory resource used by this driver is ioremap()'d and the normal read,write calls can be used instead of the __raw_* variants.
Applied, thanks.