summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Di Pierro <nierro92@gmail.com>2014-06-29 10:41:00 +0100
committerJonathan Cameron <jic23@kernel.org>2014-06-29 14:37:10 +0100
commitf1b07cdf6ba396d0ddcfd01caf358bdf897090d6 (patch)
tree1de4464d40c776e48d6a815800519d3a838efe74
parenta845a3aab8a925f675ca8520435b1218b6198a26 (diff)
staging: iio: Coding style issues fix.
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>
-rw-r--r--drivers/staging/iio/frequency/ad9832.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
index c7d0307c8e76..b7c8351ce2ff 100644
--- a/drivers/staging/iio/frequency/ad9832.c
+++ b/drivers/staging/iio/frequency/ad9832.c
@@ -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;
@@ -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);
@@ -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;
}