2008-03-28 12:50:33

by David Fries

[permalink] [raw]
Subject: [PATCH 25/35] W1: ds2490.c fix grouping error in ds_write_bit

ds2490.c 1.10

Bad grouping, fixed order of operations. It would previously always
return COMM_D.
from
COMM_BIT_IO | COMM_IM | (bit) ? COMM_D : 0
to
COMM_BIT_IO | COMM_IM | (bit ? COMM_D : 0)

Signed-off-by: David Fries <[email protected]>
---
drivers/w1/masters/ds2490.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index ac27f89..6778bd3 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -525,7 +525,7 @@ static int ds_write_bit(struct ds_device *dev, u8 bit)
int err;
struct ds_status st;

- err = ds_send_control(dev, COMM_BIT_IO | COMM_IM | (bit) ? COMM_D : 0, 0);
+ err = ds_send_control(dev, COMM_BIT_IO | COMM_IM | (bit ? COMM_D : 0), 0);
if (err)
return err;

--
1.4.4.4


Attachments:
(No filename) (807.00 B)
(No filename) (189.00 B)
Download all attachments