summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655/device_main.c
diff options
context:
space:
mode:
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>2022-08-07 21:13:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-16 16:10:41 +0300
commit6d9f3d12a89406486f9b77a1b68f16c0985f3c56 (patch)
tree7030c356f0f3deb57d6507c97096c7b81fcd102c /drivers/staging/vt6655/device_main.c
parent05e778f0c74b9ff78975490c9b0eae2bf57efeb7 (diff)
downloadlinux-6d9f3d12a89406486f9b77a1b68f16c0985f3c56.tar.xz
staging: vt6655: Convert macro MACvEnableProtectMD to function
Convert macro to static function. Multiline macros are not liked by kernel community. Rename variable dwOrgValue to reg_value to avoid CamelCase which is not accepted by checkpatch.pl. Change variable declaration to u32 as this improves readability. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/f3a5ec5352346f1dc4bf3afbee25973fdb47d7e4.1659892670.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r--drivers/staging/vt6655/device_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 8db655742bd4..ab6456fc2b3f 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -216,6 +216,15 @@ static void vt6655_mac_dma_ctl(void __iomem *iobase, u8 reg_index)
iowrite32(DMACTL_RUN, iobase + reg_index);
}
+static void MACvEnableProtectMD(void __iomem *iobase)
+{
+ u32 reg_value;
+
+ reg_value = ioread32(iobase + MAC_REG_ENCFG);
+ reg_value = reg_value | ENCFG_PROTECTMD;
+ iowrite32(reg_value, iobase + MAC_REG_ENCFG);
+}
+
/*
* Initialisation of MAC & BBP registers
*/