diff options
Diffstat (limited to 'kernel/drivers/staging/iio/meter/ade7754.c')
-rw-r--r-- | kernel/drivers/staging/iio/meter/ade7754.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/drivers/staging/iio/meter/ade7754.c b/kernel/drivers/staging/iio/meter/ade7754.c index f12b2e503..1e950685e 100644 --- a/kernel/drivers/staging/iio/meter/ade7754.c +++ b/kernel/drivers/staging/iio/meter/ade7754.c @@ -223,7 +223,7 @@ static int ade7754_reset(struct device *dev) if (ret < 0) return ret; - val |= 1 << 6; /* Software Chip Reset */ + val |= BIT(6); /* Software Chip Reset */ return ade7754_spi_write_reg_8(dev, ADE7754_OPMODE, val); } @@ -350,10 +350,10 @@ static int ade7754_set_irq(struct device *dev, bool enable) goto error_ret; if (enable) - irqen |= 1 << 14; /* Enables an interrupt when a data is + irqen |= BIT(14); /* Enables an interrupt when a data is present in the waveform register */ else - irqen &= ~(1 << 14); + irqen &= ~BIT(14); ret = ade7754_spi_write_reg_16(dev, ADE7754_IRQEN, irqen); if (ret) @@ -438,7 +438,7 @@ static ssize_t ade7754_write_frequency(struct device *dev, ret = kstrtou16(buf, 10, &val); if (ret) return ret; - if (val == 0) + if (!val) return -EINVAL; mutex_lock(&indio_dev->mlock); @@ -575,7 +575,6 @@ static int ade7754_remove(struct spi_device *spi) static struct spi_driver ade7754_driver = { .driver = { .name = "ade7754", - .owner = THIS_MODULE, }, .probe = ade7754_probe, .remove = ade7754_remove, |