Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "powerpc/powernv: Fix endian bug in LPC bus debugfs accessors"

This reverts commit bf7588a0859580a45c63cb082825d77c13eca357.

Ben says although the code is not correct "[this] fix was completely
wrong and does more damages than it fixes things."

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

+1 -3
+1 -3
arch/powerpc/platforms/powernv/opal-lpc.c
··· 191 191 { 192 192 struct lpc_debugfs_entry *lpc = filp->private_data; 193 193 u32 data, pos, len, todo; 194 - __be32 bedata; 195 194 int rc; 196 195 197 196 if (!access_ok(VERIFY_WRITE, ubuf, count)) ··· 213 214 len = 2; 214 215 } 215 216 rc = opal_lpc_read(opal_lpc_chip_id, lpc->lpc_type, pos, 216 - &bedata, len); 217 + &data, len); 217 218 if (rc) 218 219 return -ENXIO; 219 - data = be32_to_cpu(bedata); 220 220 switch(len) { 221 221 case 4: 222 222 rc = __put_user((u32)data, (u32 __user *)ubuf);