Commit 23c36c1a authored by Daniel Mack's avatar Daniel Mack Committed by Linus Torvalds

w1: coding style cleanups in w1_io.c

This fixes a number of coding style issues I stubled over.
Acked-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 50db9d8e
...@@ -69,7 +69,7 @@ static u8 w1_touch_bit(struct w1_master *dev, int bit) ...@@ -69,7 +69,7 @@ static u8 w1_touch_bit(struct w1_master *dev, int bit)
return w1_read_bit(dev); return w1_read_bit(dev);
else { else {
w1_write_bit(dev, 0); w1_write_bit(dev, 0);
return(0); return 0;
} }
} }
...@@ -184,17 +184,17 @@ static u8 w1_read_bit(struct w1_master *dev) ...@@ -184,17 +184,17 @@ static u8 w1_read_bit(struct w1_master *dev)
*/ */
u8 w1_triplet(struct w1_master *dev, int bdir) u8 w1_triplet(struct w1_master *dev, int bdir)
{ {
if ( dev->bus_master->triplet ) if (dev->bus_master->triplet)
return(dev->bus_master->triplet(dev->bus_master->data, bdir)); return dev->bus_master->triplet(dev->bus_master->data, bdir);
else { else {
u8 id_bit = w1_touch_bit(dev, 1); u8 id_bit = w1_touch_bit(dev, 1);
u8 comp_bit = w1_touch_bit(dev, 1); u8 comp_bit = w1_touch_bit(dev, 1);
u8 retval; u8 retval;
if ( id_bit && comp_bit ) if (id_bit && comp_bit)
return(0x03); /* error */ return 0x03; /* error */
if ( !id_bit && !comp_bit ) { if (!id_bit && !comp_bit) {
/* Both bits are valid, take the direction given */ /* Both bits are valid, take the direction given */
retval = bdir ? 0x04 : 0; retval = bdir ? 0x04 : 0;
} else { } else {
...@@ -203,11 +203,11 @@ u8 w1_triplet(struct w1_master *dev, int bdir) ...@@ -203,11 +203,11 @@ u8 w1_triplet(struct w1_master *dev, int bdir)
retval = id_bit ? 0x05 : 0x02; retval = id_bit ? 0x05 : 0x02;
} }
if ( dev->bus_master->touch_bit ) if (dev->bus_master->touch_bit)
w1_touch_bit(dev, bdir); w1_touch_bit(dev, bdir);
else else
w1_write_bit(dev, bdir); w1_write_bit(dev, bdir);
return(retval); return retval;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment