Commit 0eea4ce3 authored by Sandhya Bankar's avatar Sandhya Bankar Committed by Greg Kroah-Hartman

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

Fix open parentheses alignment issues.
Signed-off-by: default avatarSandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5359ada2
......@@ -24,9 +24,7 @@
#include "meter.h"
#include "ade7758.h"
int ade7758_spi_write_reg_8(struct device *dev,
u8 reg_address,
u8 val)
int ade7758_spi_write_reg_8(struct device *dev, u8 reg_address, u8 val)
{
int ret;
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
......@@ -42,8 +40,7 @@ int ade7758_spi_write_reg_8(struct device *dev,
return ret;
}
static int ade7758_spi_write_reg_16(struct device *dev,
u8 reg_address,
static int ade7758_spi_write_reg_16(struct device *dev, u8 reg_address,
u16 value)
{
int ret;
......@@ -68,8 +65,7 @@ static int ade7758_spi_write_reg_16(struct device *dev,
return ret;
}
static int ade7758_spi_write_reg_24(struct device *dev,
u8 reg_address,
static int ade7758_spi_write_reg_24(struct device *dev, u8 reg_address,
u32 value)
{
int ret;
......@@ -95,9 +91,7 @@ static int ade7758_spi_write_reg_24(struct device *dev,
return ret;
}
int ade7758_spi_read_reg_8(struct device *dev,
u8 reg_address,
u8 *val)
int ade7758_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ade7758_state *st = iio_priv(indio_dev);
......@@ -134,8 +128,7 @@ int ade7758_spi_read_reg_8(struct device *dev,
return ret;
}
static int ade7758_spi_read_reg_16(struct device *dev,
u8 reg_address,
static int ade7758_spi_read_reg_16(struct device *dev, u8 reg_address,
u16 *val)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
......@@ -176,8 +169,7 @@ static int ade7758_spi_read_reg_16(struct device *dev,
return ret;
}
static int ade7758_spi_read_reg_24(struct device *dev,
u8 reg_address,
static int ade7758_spi_read_reg_24(struct device *dev, u8 reg_address,
u32 *val)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
......@@ -218,8 +210,7 @@ static int ade7758_spi_read_reg_24(struct device *dev,
}
static ssize_t ade7758_read_8bit(struct device *dev,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr, char *buf)
{
int ret;
u8 val = 0;
......@@ -233,8 +224,7 @@ static ssize_t ade7758_read_8bit(struct device *dev,
}
static ssize_t ade7758_read_16bit(struct device *dev,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr, char *buf)
{
int ret;
u16 val = 0;
......@@ -248,8 +238,7 @@ static ssize_t ade7758_read_16bit(struct device *dev,
}
static ssize_t ade7758_read_24bit(struct device *dev,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr, char *buf)
{
int ret;
u32 val = 0;
......@@ -264,8 +253,7 @@ static ssize_t ade7758_read_24bit(struct device *dev,
static ssize_t ade7758_write_8bit(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
const char *buf, size_t len)
{
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
int ret;
......@@ -282,8 +270,7 @@ static ssize_t ade7758_write_8bit(struct device *dev,
static ssize_t ade7758_write_16bit(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
const char *buf, size_t len)
{
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
int ret;
......@@ -479,16 +466,13 @@ static int ade7758_initial_setup(struct iio_dev *indio_dev)
}
static ssize_t ade7758_read_frequency(struct device *dev,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr, char *buf)
{
int ret;
u8 t;
int sps;
ret = ade7758_spi_read_reg_8(dev,
ADE7758_WAVMODE,
&t);
ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, &t);
if (ret)
return ret;
......@@ -500,8 +484,7 @@ static ssize_t ade7758_read_frequency(struct device *dev,
static ssize_t ade7758_write_frequency(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
u16 val;
......@@ -532,18 +515,14 @@ static ssize_t ade7758_write_frequency(struct device *dev,
goto out;
}
ret = ade7758_spi_read_reg_8(dev,
ADE7758_WAVMODE,
&reg);
ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, &reg);
if (ret)
goto out;
reg &= ~(5 << 3);
reg |= t << 5;
ret = ade7758_spi_write_reg_8(dev,
ADE7758_WAVMODE,
reg);
ret = ade7758_spi_write_reg_8(dev, ADE7758_WAVMODE, reg);
out:
mutex_unlock(&indio_dev->mlock);
......
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