From: David Fries Date: Thu, 16 Oct 2008 05:05:04 +0000 (-0700) Subject: W1: ds2490.c ds_write_bit, grouping error, disable readback X-Git-Tag: v2.6.28-rc1~312 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e1c86d226daf95407d66246ced8fe087055acc6b;p=linux-2.6-omap-h63xx.git W1: ds2490.c ds_write_bit, grouping error, disable readback ds_write_bit doesn't read the input buffer, so add COMM_ICP and a comment that it will no longer generate a read back data byte. If there is an extra data byte later on then it will cause an error and discard what data was there. Corrected operator ordering for ds_send_control. Signed-off-by: David Fries Signed-off-by: Evgeniy Polyakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c index 6b188e8008e..6fabf584395 100644 --- a/drivers/w1/masters/ds2490.c +++ b/drivers/w1/masters/ds2490.c @@ -525,7 +525,12 @@ 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); + /* Set COMM_ICP to write without a readback. Note, this will + * produce one time slot, a down followed by an up with COMM_D + * only determing the timing. + */ + err = ds_send_control(dev, COMM_BIT_IO | COMM_IM | COMM_ICP | + (bit ? COMM_D : 0), 0); if (err) return err;