[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78883f42b2df258dbf821d7f7515a82932a157f1.1659892670.git.philipp.g.hortmann@gmail.com>
Date: Sun, 7 Aug 2022 20:13:37 +0200
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Forest Bond <forest@...ttletooquiet.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH v2 2/6] 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@...il.com>
---
V1 -> V2: Change function to cover only the set bits part and omitted
the clear bits part
Changed title from "...four..." to "...two..."
Changed description accordingly
---
drivers/staging/vt6655/device_main.c | 9 +++++++--
1 file 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
*/
--
2.37.1
Powered by blists - more mailing lists