Commit 748df3b1 authored by Georgiana Rodica Chelu's avatar Georgiana Rodica Chelu Committed by Greg Kroah-Hartman

staging: iio: meter: ade7754: Match alignment with open parenthesis

Reorganize the parameters to improve the readability of the code in
two manners:
- parameters of distinctive variable types on different lines
- parameters of similar variable types on the same line

Also, take advantage of the horizontal space available and place
all the parameters on a single line.

Issues found by checkpatch.pl script.
Signed-off-by: default avatarGeorgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 89237e06
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
#include "meter.h" #include "meter.h"
#include "ade7754.h" #include "ade7754.h"
static int ade7754_spi_write_reg_8(struct device *dev, static int ade7754_spi_write_reg_8(struct device *dev, u8 reg_address, u8 val)
u8 reg_address,
u8 val)
{ {
int ret; int ret;
struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct iio_dev *indio_dev = dev_to_iio_dev(dev);
...@@ -42,8 +40,7 @@ static int ade7754_spi_write_reg_8(struct device *dev, ...@@ -42,8 +40,7 @@ static int ade7754_spi_write_reg_8(struct device *dev,
} }
static int ade7754_spi_write_reg_16(struct device *dev, static int ade7754_spi_write_reg_16(struct device *dev,
u8 reg_address, u8 reg_address, u16 value)
u16 value)
{ {
int ret; int ret;
struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct iio_dev *indio_dev = dev_to_iio_dev(dev);
...@@ -59,9 +56,7 @@ static int ade7754_spi_write_reg_16(struct device *dev, ...@@ -59,9 +56,7 @@ static int ade7754_spi_write_reg_16(struct device *dev,
return ret; return ret;
} }
static int ade7754_spi_read_reg_8(struct device *dev, static int ade7754_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val)
u8 reg_address,
u8 *val)
{ {
struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ade7754_state *st = iio_priv(indio_dev); struct ade7754_state *st = iio_priv(indio_dev);
...@@ -79,8 +74,7 @@ static int ade7754_spi_read_reg_8(struct device *dev, ...@@ -79,8 +74,7 @@ static int ade7754_spi_read_reg_8(struct device *dev,
} }
static int ade7754_spi_read_reg_16(struct device *dev, static int ade7754_spi_read_reg_16(struct device *dev,
u8 reg_address, u8 reg_address, u16 *val)
u16 *val)
{ {
struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ade7754_state *st = iio_priv(indio_dev); struct ade7754_state *st = iio_priv(indio_dev);
...@@ -99,8 +93,7 @@ static int ade7754_spi_read_reg_16(struct device *dev, ...@@ -99,8 +93,7 @@ static int ade7754_spi_read_reg_16(struct device *dev,
} }
static int ade7754_spi_read_reg_24(struct device *dev, static int ade7754_spi_read_reg_24(struct device *dev,
u8 reg_address, u8 reg_address, u32 *val)
u32 *val)
{ {
struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ade7754_state *st = iio_priv(indio_dev); struct ade7754_state *st = iio_priv(indio_dev);
...@@ -410,9 +403,7 @@ static ssize_t ade7754_read_frequency(struct device *dev, ...@@ -410,9 +403,7 @@ static ssize_t ade7754_read_frequency(struct device *dev,
u8 t; u8 t;
int sps; int sps;
ret = ade7754_spi_read_reg_8(dev, ret = ade7754_spi_read_reg_8(dev, ADE7754_WAVMODE, &t);
ADE7754_WAVMODE,
&t);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment