diff options
author | Matthieu Simon <gmatthsim@gmail.com> | 2017-02-07 22:48:43 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-09 13:23:13 +0100 |
commit | c075b6f2d357ea91e8ef01e860571e7d151f3aa3 (patch) | |
tree | 709da17d18f67294f1dd821d46d199cc1aac17c5 /drivers/staging/sm750fb/sm750_cursor.c | |
parent | 0840ff76902da3c92ecda4660ee3b1a795bbc09d (diff) | |
download | op-kernel-dev-c075b6f2d357ea91e8ef01e860571e7d151f3aa3.zip op-kernel-dev-c075b6f2d357ea91e8ef01e860571e7d151f3aa3.tar.gz |
staging: sm750fb: Replace POKE32 and PEEK32 by inline functions
POKE32 and PEEK32 have been replaced by inlined functions poke32 and
peek32.
Having inline functions instead of macros help to get the correct
type-checking and avoid the possible precedence issues reported by
checkpatch.
Signed-off-by: Matthieu Simon <gmatthsim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb/sm750_cursor.c')
-rw-r--r-- | drivers/staging/sm750fb/sm750_cursor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c index 2a13353..b1651b0 100644 --- a/drivers/staging/sm750fb/sm750_cursor.c +++ b/drivers/staging/sm750fb/sm750_cursor.c @@ -20,7 +20,7 @@ -#define POKE32(addr, data) \ +#define poke32(addr, data) \ writel((data), cursor->mmio + (addr)) /* cursor control for voyager and 718/750*/ @@ -52,11 +52,11 @@ void sm750_hw_cursor_enable(struct lynx_cursor *cursor) u32 reg; reg = (cursor->offset & HWC_ADDRESS_ADDRESS_MASK) | HWC_ADDRESS_ENABLE; - POKE32(HWC_ADDRESS, reg); + poke32(HWC_ADDRESS, reg); } void sm750_hw_cursor_disable(struct lynx_cursor *cursor) { - POKE32(HWC_ADDRESS, 0); + poke32(HWC_ADDRESS, 0); } void sm750_hw_cursor_setSize(struct lynx_cursor *cursor, @@ -72,7 +72,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, reg = (((y << HWC_LOCATION_Y_SHIFT) & HWC_LOCATION_Y_MASK) | (x & HWC_LOCATION_X_MASK)); - POKE32(HWC_LOCATION, reg); + poke32(HWC_LOCATION, reg); } void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg) @@ -80,8 +80,8 @@ void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 reg = (fg << HWC_COLOR_12_2_RGB565_SHIFT) & HWC_COLOR_12_2_RGB565_MASK; - POKE32(HWC_COLOR_12, reg | (bg & HWC_COLOR_12_1_RGB565_MASK)); - POKE32(HWC_COLOR_3, 0xffe0); + poke32(HWC_COLOR_12, reg | (bg & HWC_COLOR_12_1_RGB565_MASK)); + poke32(HWC_COLOR_3, 0xffe0); } void sm750_hw_cursor_setData(struct lynx_cursor *cursor, |