Skip to content

Commit

Permalink
staging: iio: ad5933: align arguments on new line with open parenthesis
Browse files Browse the repository at this point in the history
Issue found by checkpatch: "Alignment should match open parenthesis."
Multiple lines are also reduced to a single line where possible.

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Katie Dunne authored and Jonathan Cameron committed Sep 18, 2016
1 parent becf05e commit a888677
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions drivers/staging/iio/impedance-analyzer/ad5933.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ static const struct iio_chan_spec ad5933_channels[] = {
},
};

static int ad5933_i2c_write(struct i2c_client *client,
u8 reg, u8 len, u8 *data)
static int ad5933_i2c_write(struct i2c_client *client, u8 reg, u8 len, u8 *data)
{
int ret;

Expand All @@ -171,8 +170,7 @@ static int ad5933_i2c_write(struct i2c_client *client,
return 0;
}

static int ad5933_i2c_read(struct i2c_client *client,
u8 reg, u8 len, u8 *data)
static int ad5933_i2c_read(struct i2c_client *client, u8 reg, u8 len, u8 *data)
{
int ret;

Expand Down Expand Up @@ -269,7 +267,8 @@ static int ad5933_setup(struct ad5933_state *st)
dat = cpu_to_be16(st->settling_cycles);

ret = ad5933_i2c_write(st->client,
AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
AD5933_REG_SETTLING_CYCLES,
2, (u8 *)&dat);
if (ret < 0)
return ret;

Expand All @@ -294,8 +293,8 @@ static void ad5933_calc_out_ranges(struct ad5933_state *st)
*/

static ssize_t ad5933_show_frequency(struct device *dev,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr,
char *buf)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad5933_state *st = iio_priv(indio_dev);
Expand All @@ -322,9 +321,9 @@ static ssize_t ad5933_show_frequency(struct device *dev,
}

static ssize_t ad5933_store_frequency(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
struct device_attribute *attr,
const char *buf,
size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad5933_state *st = iio_priv(indio_dev);
Expand Down Expand Up @@ -357,8 +356,8 @@ static IIO_DEVICE_ATTR(out_voltage0_freq_increment, S_IRUGO | S_IWUSR,
AD5933_REG_FREQ_INC);

static ssize_t ad5933_show(struct device *dev,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr,
char *buf)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad5933_state *st = iio_priv(indio_dev);
Expand Down Expand Up @@ -399,9 +398,9 @@ static ssize_t ad5933_show(struct device *dev,
}

static ssize_t ad5933_store(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
struct device_attribute *attr,
const char *buf,
size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad5933_state *st = iio_priv(indio_dev);
Expand Down Expand Up @@ -451,7 +450,8 @@ static ssize_t ad5933_store(struct device *dev,

dat = cpu_to_be16(val);
ret = ad5933_i2c_write(st->client,
AD5933_REG_SETTLING_CYCLES, 2, (u8 *)&dat);
AD5933_REG_SETTLING_CYCLES,
2, (u8 *)&dat);
break;
case AD5933_FREQ_POINTS:
val = clamp(val, (u16)0, (u16)511);
Expand Down Expand Up @@ -545,8 +545,8 @@ static int ad5933_read_raw(struct iio_dev *indio_dev,
goto out;

ret = ad5933_i2c_read(st->client,
AD5933_REG_TEMP_DATA, 2,
(u8 *)&dat);
AD5933_REG_TEMP_DATA,
2, (u8 *)&dat);
if (ret < 0)
goto out;
mutex_unlock(&indio_dev->mlock);
Expand Down Expand Up @@ -705,7 +705,7 @@ static void ad5933_work(struct work_struct *work)
}

static int ad5933_probe(struct i2c_client *client,
const struct i2c_device_id *id)
const struct i2c_device_id *id)
{
int ret, voltage_uv = 0;
struct ad5933_platform_data *pdata = dev_get_platdata(&client->dev);
Expand Down

0 comments on commit a888677

Please sign in to comment.