diff options
Diffstat (limited to 'drivers/w1/w1_io.c')
| -rw-r--r-- | drivers/w1/w1_io.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c index 442bd8bbd4a..3ebe9726a9e 100644 --- a/drivers/w1/w1_io.c +++ b/drivers/w1/w1_io.c | |||
| @@ -69,7 +69,7 @@ static u8 w1_touch_bit(struct w1_master *dev, int bit) | |||
| 69 | return w1_read_bit(dev); | 69 | return w1_read_bit(dev); |
| 70 | else { | 70 | else { |
| 71 | w1_write_bit(dev, 0); | 71 | w1_write_bit(dev, 0); |
| 72 | return(0); | 72 | return 0; |
| 73 | } | 73 | } |
| 74 | } | 74 | } |
| 75 | 75 | ||
| @@ -184,17 +184,17 @@ static u8 w1_read_bit(struct w1_master *dev) | |||
| 184 | */ | 184 | */ |
| 185 | u8 w1_triplet(struct w1_master *dev, int bdir) | 185 | u8 w1_triplet(struct w1_master *dev, int bdir) |
| 186 | { | 186 | { |
| 187 | if ( dev->bus_master->triplet ) | 187 | if (dev->bus_master->triplet) |
| 188 | return(dev->bus_master->triplet(dev->bus_master->data, bdir)); | 188 | return dev->bus_master->triplet(dev->bus_master->data, bdir); |
| 189 | else { | 189 | else { |
| 190 | u8 id_bit = w1_touch_bit(dev, 1); | 190 | u8 id_bit = w1_touch_bit(dev, 1); |
| 191 | u8 comp_bit = w1_touch_bit(dev, 1); | 191 | u8 comp_bit = w1_touch_bit(dev, 1); |
| 192 | u8 retval; | 192 | u8 retval; |
| 193 | 193 | ||
| 194 | if ( id_bit && comp_bit ) | 194 | if (id_bit && comp_bit) |
| 195 | return(0x03); /* error */ | 195 | return 0x03; /* error */ |
| 196 | 196 | ||
| 197 | if ( !id_bit && !comp_bit ) { | 197 | if (!id_bit && !comp_bit) { |
| 198 | /* Both bits are valid, take the direction given */ | 198 | /* Both bits are valid, take the direction given */ |
| 199 | retval = bdir ? 0x04 : 0; | 199 | retval = bdir ? 0x04 : 0; |
| 200 | } else { | 200 | } else { |
| @@ -203,11 +203,11 @@ u8 w1_triplet(struct w1_master *dev, int bdir) | |||
| 203 | retval = id_bit ? 0x05 : 0x02; | 203 | retval = id_bit ? 0x05 : 0x02; |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | if ( dev->bus_master->touch_bit ) | 206 | if (dev->bus_master->touch_bit) |
| 207 | w1_touch_bit(dev, bdir); | 207 | w1_touch_bit(dev, bdir); |
| 208 | else | 208 | else |
| 209 | w1_write_bit(dev, bdir); | 209 | w1_write_bit(dev, bdir); |
| 210 | return(retval); | 210 | return retval; |
| 211 | } | 211 | } |
| 212 | } | 212 | } |
| 213 | 213 | ||
