Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139726
b: refs/heads/master
c: 23c36c1
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Linus Torvalds committed Apr 3, 2009
1 parent db02602 commit 370897b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50db9d8e4ca17974595e3848cb65f9371a304de4
refs/heads/master: 23c36c1aec895fd52d7dd8cd3ce4bbce43c969fd
16 changes: 8 additions & 8 deletions trunk/drivers/w1/w1_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static u8 w1_touch_bit(struct w1_master *dev, int bit)
return w1_read_bit(dev);
else {
w1_write_bit(dev, 0);
return(0);
return 0;
}
}

Expand Down Expand Up @@ -184,17 +184,17 @@ static u8 w1_read_bit(struct w1_master *dev)
*/
u8 w1_triplet(struct w1_master *dev, int bdir)
{
if ( dev->bus_master->triplet )
return(dev->bus_master->triplet(dev->bus_master->data, bdir));
if (dev->bus_master->triplet)
return dev->bus_master->triplet(dev->bus_master->data, bdir);
else {
u8 id_bit = w1_touch_bit(dev, 1);
u8 comp_bit = w1_touch_bit(dev, 1);
u8 retval;

if ( id_bit && comp_bit )
return(0x03); /* error */
if (id_bit && comp_bit)
return 0x03; /* error */

if ( !id_bit && !comp_bit ) {
if (!id_bit && !comp_bit) {
/* Both bits are valid, take the direction given */
retval = bdir ? 0x04 : 0;
} else {
Expand All @@ -203,11 +203,11 @@ u8 w1_triplet(struct w1_master *dev, int bdir)
retval = id_bit ? 0x05 : 0x02;
}

if ( dev->bus_master->touch_bit )
if (dev->bus_master->touch_bit)
w1_touch_bit(dev, bdir);
else
w1_write_bit(dev, bdir);
return(retval);
return retval;
}
}

Expand Down

0 comments on commit 370897b

Please sign in to comment.