summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2019-10-06 15:22:03 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-10-15 22:11:05 +0200
commitb307f495468b455d3f85f8715e5b7cd83937a76a (patch)
treef3565730f9922f44e38604e7cb7ea8e81a37d1e0 /drivers/iio
parentiio: imu: st_lsm6dsx: grab conf mutex in st_lsm6dsx_write_event_config (diff)
downloadlinux-b307f495468b455d3f85f8715e5b7cd83937a76a.tar.xz
linux-b307f495468b455d3f85f8715e5b7cd83937a76a.zip
iio: imu: st_lsm6dsx: fix checkpatch warning
Fix following checkpatch warnings: CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_read_event(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_write_event(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, WARNING: line over 80 characters + if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 0d5054a5105e..c0df2615ed74 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -1538,12 +1538,13 @@ static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
return IIO_VAL_INT;
}
-static int st_lsm6dsx_write_event(struct iio_dev *iio_dev,
- const struct iio_chan_spec *chan,
- enum iio_event_type type,
- enum iio_event_direction dir,
- enum iio_event_info info,
- int val, int val2)
+static int
+st_lsm6dsx_write_event(struct iio_dev *iio_dev,
+ const struct iio_chan_spec *chan,
+ enum iio_event_type type,
+ enum iio_event_direction dir,
+ enum iio_event_info info,
+ int val, int val2)
{
struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
struct st_lsm6dsx_hw *hw = sensor->hw;
@@ -1569,10 +1570,11 @@ static int st_lsm6dsx_write_event(struct iio_dev *iio_dev,
return 0;
}
-static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
- const struct iio_chan_spec *chan,
- enum iio_event_type type,
- enum iio_event_direction dir)
+static int
+st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
+ const struct iio_chan_spec *chan,
+ enum iio_event_type type,
+ enum iio_event_direction dir)
{
struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
struct st_lsm6dsx_hw *hw = sensor->hw;
@@ -1583,11 +1585,11 @@ static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
return !!(hw->enable_event & BIT(chan->channel2));
}
-static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
- const struct iio_chan_spec *chan,
- enum iio_event_type type,
- enum iio_event_direction dir,
- int state)
+static int
+st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
+ const struct iio_chan_spec *chan,
+ enum iio_event_type type,
+ enum iio_event_direction dir, int state)
{
struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
struct st_lsm6dsx_hw *hw = sensor->hw;
@@ -2160,7 +2162,8 @@ int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id,
return err;
}
- if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))
+ if (dev->of_node &&
+ of_property_read_bool(dev->of_node, "wakeup-source"))
device_init_wakeup(dev, true);
return 0;