diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2022-07-13 07:01:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-14 15:48:38 +0200 |
commit | 1b225449151fd01fa83ca144996509e2f936a8a2 (patch) | |
tree | d8f00458640f55ca8cb6d42c1e414b214deb452e /drivers/staging/vt6655 | |
parent | 28d4e692874cf3f730c5c28fc8a130b2faa6fbcb (diff) |
staging: vt6655: Convert macro vt6655_mac_reg_bits_on to function
Convert macro vt6655_mac_reg_bits_on to function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6b23869ec13b35359b135f005a81f3ed50e5801e.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/mac.c | 8 | ||||
-rw-r--r-- | drivers/staging/vt6655/mac.h | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 688f7c685c97..902034a28c6c 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -38,6 +38,14 @@ #include "mac.h" +void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask) +{ + unsigned char reg_value; + + reg_value = ioread8(iobase + reg_offset); + iowrite8(reg_value | bit_mask, iobase + reg_offset); +} + /* * Description: * Test if all test bits off diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 4d328b724559..031316d42dba 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -537,13 +537,6 @@ /*--------------------- Export Macros ------------------------------*/ -#define vt6655_mac_reg_bits_on(iobase, reg_offset, bit_mask) \ -do { \ - unsigned char reg_value; \ - reg_value = ioread8(iobase + reg_offset); \ - iowrite8(reg_value | (bit_mask), iobase + reg_offset); \ -} while (0) - #define vt6655_mac_word_reg_bits_on(iobase, reg_offset, bit_mask) \ do { \ unsigned short reg_value; \ @@ -666,6 +659,7 @@ do { \ #define MAKEWORD(lb, hb) \ ((unsigned short)(((unsigned char)(lb)) | (((unsigned short)((unsigned char)(hb))) << 8))) +void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask); bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); |