aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/slaves/w1_therm.c
diff options
context:
space:
mode:
authorBen Werbowyj <ben.werbowyj@gmail.com>2016-07-22 00:33:33 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-31 07:56:04 -0400
commitd4c3f97a062969ce52ecc5428e3dbbe93c157dd2 (patch)
tree898788a0ce563481751fd516a372c91ab59d56e9 /drivers/w1/slaves/w1_therm.c
parent34924b2311b08b22f4bc5f47bc350dba4b35a37f (diff)
drivers: w1: style corrections for parenthesis and braces
Inserted whitespace between command and open parenthesis at two locations. Removed new line between open brace and command/declaration at two locations. 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>
Diffstat (limited to 'drivers/w1/slaves/w1_therm.c')
-rw-r--r--drivers/w1/slaves/w1_therm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index 581a300fd6cd..efe9d2154a1a 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -81,7 +81,7 @@ static int w1_therm_add_slave(struct w1_slave *sl)
81static void w1_therm_remove_slave(struct w1_slave *sl) 81static void w1_therm_remove_slave(struct w1_slave *sl)
82{ 82{
83 int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data)); 83 int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data));
84 while(refcnt) { 84 while (refcnt) {
85 msleep(1000); 85 msleep(1000);
86 refcnt = atomic_read(THERM_REFCNT(sl->family_data)); 86 refcnt = atomic_read(THERM_REFCNT(sl->family_data));
87 } 87 }
@@ -151,8 +151,7 @@ static struct w1_family w1_therm_family_DS1825 = {
151 .fops = &w1_therm_fops, 151 .fops = &w1_therm_fops,
152}; 152};
153 153
154struct w1_therm_family_converter 154struct w1_therm_family_converter {
155{
156 u8 broken; 155 u8 broken;
157 u16 reserved; 156 u16 reserved;
158 struct w1_family *f; 157 struct w1_family *f;
@@ -293,7 +292,7 @@ static inline int w1_DS18B20_precision(struct device *device, int val)
293 uint8_t precision_bits; 292 uint8_t precision_bits;
294 uint8_t mask = 0x60; 293 uint8_t mask = 0x60;
295 294
296 if(val > 12 || val < 9) { 295 if (val > 12 || val < 9) {
297 pr_warn("Unsupported precision\n"); 296 pr_warn("Unsupported precision\n");
298 return -1; 297 return -1;
299 } 298 }
@@ -439,8 +438,7 @@ static ssize_t w1_slave_show(struct device *device,
439 if (ret != 0) 438 if (ret != 0)
440 goto post_unlock; 439 goto post_unlock;
441 440
442 if(!sl->family_data) 441 if (!sl->family_data) {
443 {
444 ret = -ENODEV; 442 ret = -ENODEV;
445 goto pre_unlock; 443 goto pre_unlock;
446 } 444 }