summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2016-03-06 12:57:07 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-11 03:19:16 (GMT)
commit58fe2702c430e2db1210075ed890b5abb15e90f3 (patch)
tree58a79dbe4a52921a565958099417bc9f09421a11
parente206939f99a1ed1625bcce32f6eb53c296576eff (diff)
downloadlinux-58fe2702c430e2db1210075ed890b5abb15e90f3.tar.xz
staging: vt6655: MACvSetLoopbackMode replace byOrgValue with ioread8
Removing VNSvInPortB and nesting inside iowrite8. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/vt6655/mac.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index 6499709..ece2bf0 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -184,14 +184,11 @@ void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit)
void MACvSetLoopbackMode(struct vnt_private *priv, unsigned char byLoopbackMode)
{
void __iomem *io_base = priv->PortOffset;
- unsigned char byOrgValue;
byLoopbackMode <<= 6;
/* set TCR */
- VNSvInPortB(io_base + MAC_REG_TEST, &byOrgValue);
- byOrgValue = byOrgValue & 0x3F;
- byOrgValue = byOrgValue | byLoopbackMode;
- iowrite8(byOrgValue, io_base + MAC_REG_TEST);
+ iowrite8((ioread8(io_base + MAC_REG_TEST) & 0x3f) | byLoopbackMode,
+ io_base + MAC_REG_TEST);
}
/*