Commit b662f4ba authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

iio: core: Improve indentation in a few places

Improve an indentation in a few places to increase readability.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230721170022.3461-9-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1702df5d
...@@ -201,9 +201,9 @@ bool iio_buffer_enabled(struct iio_dev *indio_dev) ...@@ -201,9 +201,9 @@ bool iio_buffer_enabled(struct iio_dev *indio_dev)
{ {
struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
return iio_dev_opaque->currentmode return iio_dev_opaque->currentmode &
& (INDIO_BUFFER_TRIGGERED | INDIO_BUFFER_HARDWARE | (INDIO_BUFFER_HARDWARE | INDIO_BUFFER_SOFTWARE |
INDIO_BUFFER_SOFTWARE); INDIO_BUFFER_TRIGGERED);
} }
EXPORT_SYMBOL_GPL(iio_buffer_enabled); EXPORT_SYMBOL_GPL(iio_buffer_enabled);
...@@ -372,8 +372,8 @@ static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf, ...@@ -372,8 +372,8 @@ static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf,
} }
iio_dev_opaque->read_buf_len = snprintf(iio_dev_opaque->read_buf, iio_dev_opaque->read_buf_len = snprintf(iio_dev_opaque->read_buf,
sizeof(iio_dev_opaque->read_buf), sizeof(iio_dev_opaque->read_buf),
"0x%X\n", val); "0x%X\n", val);
return simple_read_from_buffer(userbuf, count, ppos, return simple_read_from_buffer(userbuf, count, ppos,
iio_dev_opaque->read_buf, iio_dev_opaque->read_buf,
...@@ -476,8 +476,7 @@ static ssize_t iio_read_channel_ext_info(struct device *dev, ...@@ -476,8 +476,7 @@ static ssize_t iio_read_channel_ext_info(struct device *dev,
static ssize_t iio_write_channel_ext_info(struct device *dev, static ssize_t iio_write_channel_ext_info(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, const char *buf, size_t len)
size_t len)
{ {
struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
...@@ -569,9 +568,9 @@ static int iio_setup_mount_idmatrix(const struct device *dev, ...@@ -569,9 +568,9 @@ static int iio_setup_mount_idmatrix(const struct device *dev,
ssize_t iio_show_mount_matrix(struct iio_dev *indio_dev, uintptr_t priv, ssize_t iio_show_mount_matrix(struct iio_dev *indio_dev, uintptr_t priv,
const struct iio_chan_spec *chan, char *buf) const struct iio_chan_spec *chan, char *buf)
{ {
const struct iio_mount_matrix *mtx = ((iio_get_mount_matrix_t *) const struct iio_mount_matrix *mtx;
priv)(indio_dev, chan);
mtx = ((iio_get_mount_matrix_t *)priv)(indio_dev, chan);
if (IS_ERR(mtx)) if (IS_ERR(mtx))
return PTR_ERR(mtx); return PTR_ERR(mtx);
...@@ -1009,14 +1008,12 @@ int __iio_device_attr_init(struct device_attribute *dev_attr, ...@@ -1009,14 +1008,12 @@ int __iio_device_attr_init(struct device_attribute *dev_attr,
if (chan->modified && (shared_by == IIO_SEPARATE)) { if (chan->modified && (shared_by == IIO_SEPARATE)) {
if (chan->extend_name) if (chan->extend_name)
full_postfix = kasprintf(GFP_KERNEL, "%s_%s_%s", full_postfix = kasprintf(GFP_KERNEL, "%s_%s_%s",
iio_modifier_names[chan iio_modifier_names[chan->channel2],
->channel2],
chan->extend_name, chan->extend_name,
postfix); postfix);
else else
full_postfix = kasprintf(GFP_KERNEL, "%s_%s", full_postfix = kasprintf(GFP_KERNEL, "%s_%s",
iio_modifier_names[chan iio_modifier_names[chan->channel2],
->channel2],
postfix); postfix);
} else { } else {
if (chan->extend_name == NULL || shared_by != IIO_SEPARATE) if (chan->extend_name == NULL || shared_by != IIO_SEPARATE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment