Skip to content

Commit

Permalink
staging: iio: Coding style issues fix.
Browse files Browse the repository at this point in the history
Fix some little style issues in drivers/staging/iio/frequency/ad9832.c .
This is my latest task of the eudyptula challenge (third attempt!)

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Federico Di Pierro authored and Jonathan Cameron committed Jun 29, 2014
1 parent a845a3a commit f1b07cd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions drivers/staging/iio/frequency/ad9832.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct ad9832_state *st,
}

static int ad9832_write_phase(struct ad9832_state *st,
unsigned long addr, unsigned long phase)
unsigned long addr, unsigned long phase)
{
if (phase > (1 << AD9832_PHASE_BITS))
return -EINVAL;
Expand All @@ -72,10 +72,8 @@ static int ad9832_write_phase(struct ad9832_state *st,
return spi_sync(st->spi, &st->phase_msg);
}

static ssize_t ad9832_write(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr,
const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad9832_state *st = iio_priv(indio_dev);
Expand Down Expand Up @@ -109,11 +107,11 @@ static ssize_t ad9832_write(struct device *dev,
ret = spi_sync(st->spi, &st->msg);
break;
case AD9832_FREQ_SYM:
if (val == 1)
if (val == 1) {
st->ctrl_fp |= AD9832_FREQ;
else if (val == 0)
} else if (val == 0) {
st->ctrl_fp &= ~AD9832_FREQ;
else {
} else {
ret = -EINVAL;
break;
}
Expand Down

0 comments on commit f1b07cd

Please sign in to comment.