Staging: iio: Align function parameters to match first row
authorCristina Opriceana <cristina.opriceana@gmail.com>
Thu, 19 Mar 2015 19:06:42 +0000 (21:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Mar 2015 12:35:09 +0000 (13:35 +0100)
This patch improves coding style by aligning parameters in
iio/magnetometer function calls, to remove the following warning:
"CHECK: Alignment should match open parenthesis".

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/magnetometer/hmc5843.h
drivers/staging/iio/magnetometer/hmc5843_core.c
drivers/staging/iio/magnetometer/hmc5843_i2c.c

index b784e3eb4591edec159129f709f5a72672bfe460..879d43beb7e168b72c0e74e99a39159b5dc430a2 100644 (file)
@@ -41,7 +41,7 @@ struct hmc5843_data {
 };
 
 int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
-               enum hmc5843_ids id);
+                        enum hmc5843_ids id);
 int hmc5843_common_remove(struct device *dev);
 
 int hmc5843_common_suspend(struct device *dev);
index 6befa6f8b2e0d1b23992adb0b92195ca845415a2..cb857006e676a05d65760602f73233f74fd2161e 100644 (file)
@@ -122,7 +122,7 @@ static s32 hmc5843_set_mode(struct hmc5843_data *data, u8 operating_mode)
 
        mutex_lock(&data->lock);
        ret = regmap_update_bits(data->regmap, HMC5843_MODE_REG,
-                       HMC5843_MODE_MASK, operating_mode);
+                                HMC5843_MODE_MASK, operating_mode);
        mutex_unlock(&data->lock);
 
        return ret;
@@ -165,7 +165,7 @@ static int hmc5843_read_measurement(struct hmc5843_data *data,
                return ret;
        }
        ret = regmap_bulk_read(data->regmap, HMC5843_DATA_OUT_MSB_REGS,
-                       values, sizeof(values));
+                              values, sizeof(values));
        mutex_unlock(&data->lock);
        if (ret < 0)
                return ret;
@@ -198,15 +198,16 @@ static int hmc5843_set_meas_conf(struct hmc5843_data *data, u8 meas_conf)
 
        mutex_lock(&data->lock);
        ret = regmap_update_bits(data->regmap, HMC5843_CONFIG_REG_A,
-                       HMC5843_MEAS_CONF_MASK, meas_conf);
+                                HMC5843_MEAS_CONF_MASK, meas_conf);
        mutex_unlock(&data->lock);
 
        return ret;
 }
 
-static ssize_t hmc5843_show_measurement_configuration(struct device *dev,
-                                               struct device_attribute *attr,
-                                               char *buf)
+static
+ssize_t hmc5843_show_measurement_configuration(struct device *dev,
+                                              struct device_attribute *attr,
+                                              char *buf)
 {
        struct hmc5843_data *data = iio_priv(dev_to_iio_dev(dev));
        unsigned int val;
@@ -220,10 +221,11 @@ static ssize_t hmc5843_show_measurement_configuration(struct device *dev,
        return sprintf(buf, "%d\n", val);
 }
 
-static ssize_t hmc5843_set_measurement_configuration(struct device *dev,
-                                               struct device_attribute *attr,
-                                               const char *buf,
-                                               size_t count)
+static
+ssize_t hmc5843_set_measurement_configuration(struct device *dev,
+                                             struct device_attribute *attr,
+                                             const char *buf,
+                                             size_t count)
 {
        struct hmc5843_data *data = iio_priv(dev_to_iio_dev(dev));
        unsigned long meas_conf = 0;
@@ -246,8 +248,9 @@ static IIO_DEVICE_ATTR(meas_conf,
                        hmc5843_set_measurement_configuration,
                        0);
 
-static ssize_t hmc5843_show_samp_freq_avail(struct device *dev,
-                               struct device_attribute *attr, char *buf)
+static
+ssize_t hmc5843_show_samp_freq_avail(struct device *dev,
+                                    struct device_attribute *attr, char *buf)
 {
        struct hmc5843_data *data = iio_priv(dev_to_iio_dev(dev));
        size_t len = 0;
@@ -272,20 +275,21 @@ static int hmc5843_set_samp_freq(struct hmc5843_data *data, u8 rate)
 
        mutex_lock(&data->lock);
        ret = regmap_update_bits(data->regmap, HMC5843_CONFIG_REG_A,
-                       HMC5843_RATE_MASK, rate << HMC5843_RATE_OFFSET);
+                                HMC5843_RATE_MASK,
+                                rate << HMC5843_RATE_OFFSET);
        mutex_unlock(&data->lock);
 
        return ret;
 }
 
 static int hmc5843_get_samp_freq_index(struct hmc5843_data *data,
-                                  int val, int val2)
+                                      int val, int val2)
 {
        int i;
 
        for (i = 0; i < data->variant->n_regval_to_samp_freq; i++)
                if (val == data->variant->regval_to_samp_freq[i][0] &&
-                       val2 == data->variant->regval_to_samp_freq[i][1])
+                   val2 == data->variant->regval_to_samp_freq[i][1])
                        return i;
 
        return -EINVAL;
@@ -297,15 +301,16 @@ static int hmc5843_set_range_gain(struct hmc5843_data *data, u8 range)
 
        mutex_lock(&data->lock);
        ret = regmap_update_bits(data->regmap, HMC5843_CONFIG_REG_B,
-                       HMC5843_RANGE_GAIN_MASK,
-                       range << HMC5843_RANGE_GAIN_OFFSET);
+                                HMC5843_RANGE_GAIN_MASK,
+                                range << HMC5843_RANGE_GAIN_OFFSET);
        mutex_unlock(&data->lock);
 
        return ret;
 }
 
 static ssize_t hmc5843_show_scale_avail(struct device *dev,
-                               struct device_attribute *attr, char *buf)
+                                       struct device_attribute *attr,
+                                       char *buf)
 {
        struct hmc5843_data *data = iio_priv(dev_to_iio_dev(dev));
 
@@ -396,7 +401,8 @@ static int hmc5843_write_raw(struct iio_dev *indio_dev,
 }
 
 static int hmc5843_write_raw_get_fmt(struct iio_dev *indio_dev,
-                              struct iio_chan_spec const *chan, long mask)
+                                    struct iio_chan_spec const *chan,
+                                    long mask)
 {
        switch (mask) {
        case IIO_CHAN_INFO_SAMP_FREQ:
@@ -423,14 +429,14 @@ static irqreturn_t hmc5843_trigger_handler(int irq, void *p)
        }
 
        ret = regmap_bulk_read(data->regmap, HMC5843_DATA_OUT_MSB_REGS,
-                       data->buffer, 3 * sizeof(__be16));
+                              data->buffer, 3 * sizeof(__be16));
 
        mutex_unlock(&data->lock);
        if (ret < 0)
                goto done;
 
        iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
-               iio_get_time_ns());
+                                          iio_get_time_ns());
 
 done:
        iio_trigger_notify_done(indio_dev->trig);
@@ -526,7 +532,7 @@ static int hmc5843_init(struct hmc5843_data *data)
        u8 id[3];
 
        ret = regmap_bulk_read(data->regmap, HMC5843_ID_REG,
-                       id, ARRAY_SIZE(id));
+                              id, ARRAY_SIZE(id));
        if (ret < 0)
                return ret;
        if (id[0] != 'H' || id[1] != '4' || id[2] != '3') {
@@ -567,12 +573,12 @@ EXPORT_SYMBOL(hmc5843_common_suspend);
 int hmc5843_common_resume(struct device *dev)
 {
        return hmc5843_set_mode(iio_priv(dev_get_drvdata(dev)),
-                       HMC5843_MODE_SLEEP);
+                               HMC5843_MODE_SLEEP);
 }
 EXPORT_SYMBOL(hmc5843_common_resume);
 
 int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
-               enum hmc5843_ids id)
+                        enum hmc5843_ids id)
 {
        struct hmc5843_data *data;
        struct iio_dev *indio_dev;
@@ -604,7 +610,7 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
                return ret;
 
        ret = iio_triggered_buffer_setup(indio_dev, NULL,
-               hmc5843_trigger_handler, NULL);
+                                        hmc5843_trigger_handler, NULL);
        if (ret < 0)
                return ret;
 
index 6acd614cdbc6529ae22d4df7c53548f1e3852455..8d090b47286b3566b2f14c4a5619e136eae892e6 100644 (file)
@@ -57,7 +57,7 @@ static struct regmap_config hmc5843_i2c_regmap_config = {
 };
 
 static int hmc5843_i2c_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+                            const struct i2c_device_id *id)
 {
        return hmc5843_common_probe(&client->dev,
                        devm_regmap_init_i2c(client, &hmc5843_i2c_regmap_config),