Skip to content

Commit f1b07cd

Browse files
FedeDPjic23
authored andcommitted
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>
1 parent a845a3a commit f1b07cd

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

‎drivers/staging/iio/frequency/ad9832.c‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct ad9832_state *st,
5757
}
5858

5959
static int ad9832_write_phase(struct ad9832_state *st,
60-
unsigned long addr, unsigned long phase)
60+
unsigned long addr, unsigned long phase)
6161
{
6262
if (phase > (1 << AD9832_PHASE_BITS))
6363
return -EINVAL;
@@ -72,10 +72,8 @@ static int ad9832_write_phase(struct ad9832_state *st,
7272
return spi_sync(st->spi, &st->phase_msg);
7373
}
7474

75-
static ssize_t ad9832_write(struct device *dev,
76-
struct device_attribute *attr,
77-
const char *buf,
78-
size_t len)
75+
static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr,
76+
const char *buf, size_t len)
7977
{
8078
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
8179
struct ad9832_state *st = iio_priv(indio_dev);
@@ -109,11 +107,11 @@ static ssize_t ad9832_write(struct device *dev,
109107
ret = spi_sync(st->spi, &st->msg);
110108
break;
111109
case AD9832_FREQ_SYM:
112-
if (val == 1)
110+
if (val == 1) {
113111
st->ctrl_fp |= AD9832_FREQ;
114-
else if (val == 0)
112+
} else if (val == 0) {
115113
st->ctrl_fp &= ~AD9832_FREQ;
116-
else {
114+
} else {
117115
ret = -EINVAL;
118116
break;
119117
}

0 commit comments

Comments
 (0)