Skip to content

Commit

Permalink
staging: iio: ad9850.c: code cleanup
Browse files Browse the repository at this point in the history
checkpath.pl was complaining about value_mask:
ERROR: Macros with complex values should be enclosed in parenthesis

I fixed this by simply removing it since it's not used (as well as another
macro).  Got rid of the un-necessary error_ret label as well.

Signed-off-by: Guillaume Morin <guillaume@morinfr.org>
Reported-by: Michael Welling <mwelling@ieee.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Guillaume Morin authored and Jonathan Cameron committed Jun 29, 2014
1 parent fc167f6 commit 87a4690
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/staging/iio/frequency/ad9850.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

#define DRV_NAME "ad9850"

#define value_mask (u16)0xf000
#define addr_shift 12

/* Register format: 4 bits addr + 12 bits value */
struct ad9850_config {
u8 control[5];
Expand All @@ -50,9 +47,6 @@ static ssize_t ad9850_set_parameter(struct device *dev,
mutex_lock(&st->lock);

ret = spi_sync_transfer(st->sdev, &xfer, 1);
if (ret)
goto error_ret;
error_ret:
mutex_unlock(&st->lock);

return ret ? ret : len;
Expand Down

0 comments on commit 87a4690

Please sign in to comment.