diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2022-07-13 07:02:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-14 15:48:38 +0200 |
commit | 8af028c2b22bc04f5ab59cd39fa97ccf14aa8f25 (patch) | |
tree | 014bf3875a001972a1b2a6452bbad7477f992968 | |
parent | 64a5c7bf563b3825b2c46d8a8c69a1c6c4029d2d (diff) | |
download | linux-8af028c2b22bc04f5ab59cd39fa97ccf14aa8f25.tar.gz linux-8af028c2b22bc04f5ab59cd39fa97ccf14aa8f25.tar.bz2 linux-8af028c2b22bc04f5ab59cd39fa97ccf14aa8f25.zip |
staging: vt6655: Convert macro vt6655_mac_word_reg_bits_off to function
Convert macro vt6655_mac_word_reg_bits_off 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/04fb37871c4d383c27287934a0dddb3aa7974b08.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/vt6655/mac.c | 8 | ||||
-rw-r--r-- | drivers/staging/vt6655/mac.h | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index aa9684229dfe..a7f645f9ccf8 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -62,6 +62,14 @@ void vt6655_mac_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u8 iowrite8(reg_value & ~(bit_mask), iobase + reg_offset); } +void vt6655_mac_word_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask) +{ + unsigned short reg_value; + + reg_value = ioread16(iobase + reg_offset); + iowrite16(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 e7b648cf2024..b307161818a0 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -537,13 +537,6 @@ /*--------------------- Export Macros ------------------------------*/ -#define vt6655_mac_word_reg_bits_off(iobase, reg_offset, bit_mask) \ -do { \ - unsigned short reg_value; \ - reg_value = ioread16(iobase + reg_offset); \ - iowrite16(reg_value & ~(bit_mask), iobase + reg_offset); \ -} while (0) - #define MACvReceive0(iobase) \ do { \ unsigned long dwData; \ @@ -648,6 +641,8 @@ do { \ void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask); void vt6655_mac_word_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask); void vt6655_mac_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask); +void vt6655_mac_word_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask); + bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); |