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>
This commit is contained in:
Ben Werbowyj 2016-07-22 14:33:35 +10:00 committed by Greg Kroah-Hartman
parent aaf16f7d98
commit 368451ea74

View file

@ -81,6 +81,7 @@ static int w1_therm_add_slave(struct w1_slave *sl)
static void w1_therm_remove_slave(struct w1_slave *sl) static void w1_therm_remove_slave(struct w1_slave *sl)
{ {
int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data)); int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data));
while (refcnt) { while (refcnt) {
msleep(1000); msleep(1000);
refcnt = atomic_read(THERM_REFCNT(sl->family_data)); refcnt = atomic_read(THERM_REFCNT(sl->family_data));
@ -366,6 +367,7 @@ static inline int w1_DS18B20_precision(struct device *device, int val)
static inline int w1_DS18B20_convert_temp(u8 rom[9]) static inline int w1_DS18B20_convert_temp(u8 rom[9])
{ {
s16 t = le16_to_cpup((__le16 *)rom); s16 t = le16_to_cpup((__le16 *)rom);
return t*1000/16; return t*1000/16;
} }
@ -415,7 +417,7 @@ static ssize_t w1_slave_store(struct device *device,
for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i) { for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i) {
if (w1_therm_families[i].f->fid == sl->family->fid) { if (w1_therm_families[i].f->fid == sl->family->fid) {
/* zero value indicates to write current configuration to eeprom */ /* zero value indicates to write current configuration to eeprom */
if (0 == val) if (val == 0)
ret = w1_therm_families[i].eeprom(device); ret = w1_therm_families[i].eeprom(device);
else else
ret = w1_therm_families[i].precision(device, val); ret = w1_therm_families[i].precision(device, val);