]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: vt6655: MACvSetLoopbackMode replace byOrgValue with ioread8
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 6 Mar 2016 12:57:07 +0000 (12:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2016 03:19:16 +0000 (19:19 -0800)
Removing VNSvInPortB and nesting inside iowrite8.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/mac.c

index 6499709bc865046a42d12da8195faf16efdb8d43..ece2bf076521c73ba4ed755cae4e7c9383b72959 100644 (file)
@@ -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);
 }
 
 /*