Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf19edd2 authored by Michael Ellerman's avatar Michael Ellerman
Browse files

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



This reverts commit bf7588a0.

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

Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 19d36c21
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -191,7 +191,6 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
{
	struct lpc_debugfs_entry *lpc = filp->private_data;
	u32 data, pos, len, todo;
	__be32 bedata;
	int rc;

	if (!access_ok(VERIFY_WRITE, ubuf, count))
@@ -214,10 +213,9 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
				len = 2;
		}
		rc = opal_lpc_read(opal_lpc_chip_id, lpc->lpc_type, pos,
				   &bedata, len);
				   &data, len);
		if (rc)
			return -ENXIO;
		data = be32_to_cpu(bedata);
		switch(len) {
		case 4:
			rc = __put_user((u32)data, (u32 __user *)ubuf);