Skip to content

Commit

Permalink
Revert "powerpc/powernv: Fix endian bug in LPC bus debugfs accessors"
Browse files Browse the repository at this point in the history
This reverts commit bf7588a.

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>
  • Loading branch information
Michael Ellerman committed Oct 28, 2014
1 parent 19d36c2 commit bf19edd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/platforms/powernv/opal-lpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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);
Expand Down

0 comments on commit bf19edd

Please sign in to comment.