w1: mxc_w1: Fix incorrect "presence" status
authorAlexander Shiyan <shc_work@mail.ru>
Thu, 8 May 2014 07:56:37 +0000 (11:56 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2014 00:51:46 +0000 (17:51 -0700)
W1 reset_bus() should return zero if slave device is present.
This patch fix this issue.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/mxc_w1.c

index 67b067a3e2abbcddadd60a4b9051fb23e5392f45..a5df5e89d456325d3557b5b75d3eb4d6180db8be 100644 (file)
@@ -66,7 +66,7 @@ static u8 mxc_w1_ds2_reset_bus(void *data)
 
                udelay(100);
        }
-       return !!(reg_val & MXC_W1_CONTROL_PST);
+       return !(reg_val & MXC_W1_CONTROL_PST);
 }
 
 /*