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

Staging: iio: ade7758_core: Fix open parentheses alignment issues.

Fix open parentheses alignment issues.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sandhya Bankar and committed by
Greg Kroah-Hartman
0eea4ce3 5359ada2

+26 -47
+26 -47
drivers/staging/iio/meter/ade7758_core.c
··· 24 24 #include "meter.h" 25 25 #include "ade7758.h" 26 26 27 - int ade7758_spi_write_reg_8(struct device *dev, 28 - u8 reg_address, 29 - u8 val) 27 + int ade7758_spi_write_reg_8(struct device *dev, u8 reg_address, u8 val) 30 28 { 31 29 int ret; 32 30 struct iio_dev *indio_dev = dev_to_iio_dev(dev); ··· 40 42 return ret; 41 43 } 42 44 43 - static int ade7758_spi_write_reg_16(struct device *dev, 44 - u8 reg_address, 45 - u16 value) 45 + static int ade7758_spi_write_reg_16(struct device *dev, u8 reg_address, 46 + u16 value) 46 47 { 47 48 int ret; 48 49 struct iio_dev *indio_dev = dev_to_iio_dev(dev); ··· 65 68 return ret; 66 69 } 67 70 68 - static int ade7758_spi_write_reg_24(struct device *dev, 69 - u8 reg_address, 70 - u32 value) 71 + static int ade7758_spi_write_reg_24(struct device *dev, u8 reg_address, 72 + u32 value) 71 73 { 72 74 int ret; 73 75 struct iio_dev *indio_dev = dev_to_iio_dev(dev); ··· 91 95 return ret; 92 96 } 93 97 94 - int ade7758_spi_read_reg_8(struct device *dev, 95 - u8 reg_address, 96 - u8 *val) 98 + int ade7758_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val) 97 99 { 98 100 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 99 101 struct ade7758_state *st = iio_priv(indio_dev); ··· 118 124 ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); 119 125 if (ret) { 120 126 dev_err(&st->us->dev, "problem when reading 8 bit register 0x%02X", 121 - reg_address); 127 + reg_address); 122 128 goto error_ret; 123 129 } 124 130 *val = st->rx[0]; ··· 128 134 return ret; 129 135 } 130 136 131 - static int ade7758_spi_read_reg_16(struct device *dev, 132 - u8 reg_address, 133 - u16 *val) 137 + static int ade7758_spi_read_reg_16(struct device *dev, u8 reg_address, 138 + u16 *val) 134 139 { 135 140 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 136 141 struct ade7758_state *st = iio_priv(indio_dev); ··· 158 165 ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); 159 166 if (ret) { 160 167 dev_err(&st->us->dev, "problem when reading 16 bit register 0x%02X", 161 - reg_address); 168 + reg_address); 162 169 goto error_ret; 163 170 } 164 171 ··· 169 176 return ret; 170 177 } 171 178 172 - static int ade7758_spi_read_reg_24(struct device *dev, 173 - u8 reg_address, 174 - u32 *val) 179 + static int ade7758_spi_read_reg_24(struct device *dev, u8 reg_address, 180 + u32 *val) 175 181 { 176 182 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 177 183 struct ade7758_state *st = iio_priv(indio_dev); ··· 199 207 ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); 200 208 if (ret) { 201 209 dev_err(&st->us->dev, "problem when reading 24 bit register 0x%02X", 202 - reg_address); 210 + reg_address); 203 211 goto error_ret; 204 212 } 205 213 *val = (st->rx[0] << 16) | (st->rx[1] << 8) | st->rx[2]; ··· 210 218 } 211 219 212 220 static ssize_t ade7758_read_8bit(struct device *dev, 213 - struct device_attribute *attr, 214 - char *buf) 221 + struct device_attribute *attr, char *buf) 215 222 { 216 223 int ret; 217 224 u8 val = 0; ··· 224 233 } 225 234 226 235 static ssize_t ade7758_read_16bit(struct device *dev, 227 - struct device_attribute *attr, 228 - char *buf) 236 + struct device_attribute *attr, char *buf) 229 237 { 230 238 int ret; 231 239 u16 val = 0; ··· 238 248 } 239 249 240 250 static ssize_t ade7758_read_24bit(struct device *dev, 241 - struct device_attribute *attr, 242 - char *buf) 251 + struct device_attribute *attr, char *buf) 243 252 { 244 253 int ret; 245 254 u32 val = 0; ··· 252 263 } 253 264 254 265 static ssize_t ade7758_write_8bit(struct device *dev, 255 - struct device_attribute *attr, 256 - const char *buf, 257 - size_t len) 266 + struct device_attribute *attr, 267 + const char *buf, size_t len) 258 268 { 259 269 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 260 270 int ret; ··· 269 281 } 270 282 271 283 static ssize_t ade7758_write_16bit(struct device *dev, 272 - struct device_attribute *attr, 273 - const char *buf, 274 - size_t len) 284 + struct device_attribute *attr, 285 + const char *buf, size_t len) 275 286 { 276 287 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 277 288 int ret; ··· 466 479 } 467 480 468 481 static ssize_t ade7758_read_frequency(struct device *dev, 469 - struct device_attribute *attr, 470 - char *buf) 482 + struct device_attribute *attr, char *buf) 471 483 { 472 484 int ret; 473 485 u8 t; 474 486 int sps; 475 487 476 - ret = ade7758_spi_read_reg_8(dev, 477 - ADE7758_WAVMODE, 478 - &t); 488 + ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, &t); 479 489 if (ret) 480 490 return ret; 481 491 ··· 483 499 } 484 500 485 501 static ssize_t ade7758_write_frequency(struct device *dev, 486 - struct device_attribute *attr, 487 - const char *buf, 488 - size_t len) 502 + struct device_attribute *attr, 503 + const char *buf, size_t len) 489 504 { 490 505 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 491 506 u16 val; ··· 515 532 goto out; 516 533 } 517 534 518 - ret = ade7758_spi_read_reg_8(dev, 519 - ADE7758_WAVMODE, 520 - &reg); 535 + ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, &reg); 521 536 if (ret) 522 537 goto out; 523 538 524 539 reg &= ~(5 << 3); 525 540 reg |= t << 5; 526 541 527 - ret = ade7758_spi_write_reg_8(dev, 528 - ADE7758_WAVMODE, 529 - reg); 542 + ret = ade7758_spi_write_reg_8(dev, ADE7758_WAVMODE, reg); 530 543 531 544 out: 532 545 mutex_unlock(&indio_dev->mlock);