Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: w1: style corrections-pointers-blanklines-comparisons

Correct pointer notations to include whitespace between
variable type and "*" character. Inserted blank line
after variable declatations at two locations.
Rearranged comparison within an if statment to have the
constant on the right-hand side.

Signed-off-by: Ben Werbowyj <ben.werbowyj@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ben Werbowyj and committed by
Greg Kroah-Hartman
368451ea aaf16f7d

+4 -2
+4 -2
drivers/w1/slaves/w1_therm.c
··· 66 66 67 67 /* return the address of the refcnt in the family data */ 68 68 #define THERM_REFCNT(family_data) \ 69 - (&((struct w1_therm_family_data*)family_data)->refcnt) 69 + (&((struct w1_therm_family_data *)family_data)->refcnt) 70 70 71 71 static int w1_therm_add_slave(struct w1_slave *sl) 72 72 { ··· 81 81 static void w1_therm_remove_slave(struct w1_slave *sl) 82 82 { 83 83 int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data)); 84 + 84 85 while (refcnt) { 85 86 msleep(1000); 86 87 refcnt = atomic_read(THERM_REFCNT(sl->family_data)); ··· 367 366 static inline int w1_DS18B20_convert_temp(u8 rom[9]) 368 367 { 369 368 s16 t = le16_to_cpup((__le16 *)rom); 369 + 370 370 return t*1000/16; 371 371 } 372 372 ··· 417 415 for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i) { 418 416 if (w1_therm_families[i].f->fid == sl->family->fid) { 419 417 /* zero value indicates to write current configuration to eeprom */ 420 - if (0 == val) 418 + if (val == 0) 421 419 ret = w1_therm_families[i].eeprom(device); 422 420 else 423 421 ret = w1_therm_families[i].precision(device, val);