diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-04-02 19:58:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 22:05:04 -0400 |
commit | 23c36c1aec895fd52d7dd8cd3ce4bbce43c969fd (patch) | |
tree | dac4cecda34dc97c1b353fedeba029e0481d1188 /drivers/w1 | |
parent | 50db9d8e4ca17974595e3848cb65f9371a304de4 (diff) |
w1: coding style cleanups in w1_io.c
This fixes a number of coding style issues I stubled over.
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/w1')
-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 442bd8bbd4a5..3ebe9726a9e5 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 | ||