diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2022-08-07 20:13:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-16 15:10:41 +0200 |
commit | 0e68ed8f4c4e8ff2fc9653aa1ff8f3acc760eb1a (patch) | |
tree | 49eef71b899bd00e482a2945f09df486a911781f /drivers | |
parent | 6d9f3d12a89406486f9b77a1b68f16c0985f3c56 (diff) | |
download | linux-0e68ed8f4c4e8ff2fc9653aa1ff8f3acc760eb1a.tar.gz linux-0e68ed8f4c4e8ff2fc9653aa1ff8f3acc760eb1a.tar.bz2 linux-0e68ed8f4c4e8ff2fc9653aa1ff8f3acc760eb1a.zip |
staging: vt6655: Create one function for two macros
Create function vt6655_mac_set_bits with two parameters to cover
functionality of two macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/78883f42b2df258dbf821d7f7515a82932a157f1.1659892670.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ab6456fc2b3f..dc50bff4403f 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -216,15 +216,20 @@ static void vt6655_mac_dma_ctl(void __iomem *iobase, u8 reg_index) iowrite32(DMACTL_RUN, iobase + reg_index); } -static void MACvEnableProtectMD(void __iomem *iobase) +static void vt6655_mac_set_bits(void __iomem *iobase, u32 mask) { u32 reg_value; reg_value = ioread32(iobase + MAC_REG_ENCFG); - reg_value = reg_value | ENCFG_PROTECTMD; + reg_value = reg_value | mask; iowrite32(reg_value, iobase + MAC_REG_ENCFG); } +static void MACvEnableProtectMD(void __iomem *iobase) +{ + vt6655_mac_set_bits(iobase, ENCFG_PROTECTMD); +} + /* * Initialisation of MAC & BBP registers */ |