From: Eva Rachel Retuya Date: Thu, 18 Feb 2016 07:35:36 +0000 (+0800) Subject: staging: iio: light: indent to match open parenthesis X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ca52c88cace3aa6faf8b771a5bc574b00cb74f06;p=openwrt%2Fstaging%2Fblogic.git staging: iio: light: indent to match open parenthesis Indent the parameters to match open parenthesis as suggested by checkpatch. Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 756057cae86a..98038d76da2a 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -183,7 +183,7 @@ static int isl29018_read_sensor_input(struct isl29018_chip *chip, int mode) /* Set mode */ status = regmap_write(chip->regmap, ISL29018_REG_ADD_COMMAND1, - mode << COMMMAND1_OPMODE_SHIFT); + mode << COMMMAND1_OPMODE_SHIFT); if (status) { dev_err(chip->dev, "Error in setting operating mode err %d\n", status); @@ -241,7 +241,7 @@ static int isl29018_read_ir(struct isl29018_chip *chip, int *ir) } static int isl29018_read_proximity_ir(struct isl29018_chip *chip, int scheme, - int *near_ir) + int *near_ir) { int status; int prox_data = -1; @@ -249,15 +249,15 @@ static int isl29018_read_proximity_ir(struct isl29018_chip *chip, int scheme, /* Do proximity sensing with required scheme */ status = regmap_update_bits(chip->regmap, ISL29018_REG_ADD_COMMANDII, - COMMANDII_SCHEME_MASK, - scheme << COMMANDII_SCHEME_SHIFT); + COMMANDII_SCHEME_MASK, + scheme << COMMANDII_SCHEME_SHIFT); if (status) { dev_err(chip->dev, "Error in setting operating mode\n"); return status; } prox_data = isl29018_read_sensor_input(chip, - COMMMAND1_OPMODE_PROX_ONCE); + COMMMAND1_OPMODE_PROX_ONCE); if (prox_data < 0) return prox_data; @@ -280,7 +280,7 @@ static int isl29018_read_proximity_ir(struct isl29018_chip *chip, int scheme, } static ssize_t show_scale_available(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -297,7 +297,7 @@ static ssize_t show_scale_available(struct device *dev, } static ssize_t show_int_time_available(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -314,7 +314,8 @@ static ssize_t show_int_time_available(struct device *dev, /* proximity scheme */ static ssize_t show_prox_infrared_suppression(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, + char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -325,7 +326,8 @@ static ssize_t show_prox_infrared_suppression(struct device *dev, } static ssize_t store_prox_infrared_suppression(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count) + struct device_attribute *attr, + const char *buf, size_t count) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -413,7 +415,8 @@ static int isl29018_read_raw(struct iio_dev *indio_dev, break; case IIO_PROXIMITY: ret = isl29018_read_proximity_ir(chip, - chip->prox_scheme, val); + chip->prox_scheme, + val); break; default: break; @@ -705,7 +708,7 @@ static const char *isl29018_match_acpi_device(struct device *dev, int *data) } static int isl29018_probe(struct i2c_client *client, - const struct i2c_device_id *id) + const struct i2c_device_id *id) { struct isl29018_chip *chip; struct iio_dev *indio_dev; diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c index e1bca9c55119..6e2ba458c24d 100644 --- a/drivers/staging/iio/light/isl29028.c +++ b/drivers/staging/iio/light/isl29028.c @@ -81,7 +81,7 @@ struct isl29028_chip { }; static int isl29028_set_proxim_sampling(struct isl29028_chip *chip, - unsigned int sampling) + unsigned int sampling) { static unsigned int prox_period[] = {800, 400, 200, 100, 75, 50, 12, 0}; int sel; @@ -103,7 +103,7 @@ static int isl29028_enable_proximity(struct isl29028_chip *chip, bool enable) if (enable) val = CONFIGURE_PROX_EN; ret = regmap_update_bits(chip->regmap, ISL29028_REG_CONFIGURE, - CONFIGURE_PROX_EN_MASK, val); + CONFIGURE_PROX_EN_MASK, val); if (ret < 0) return ret; @@ -122,24 +122,27 @@ static int isl29028_set_als_scale(struct isl29028_chip *chip, int lux_scale) } static int isl29028_set_als_ir_mode(struct isl29028_chip *chip, - enum als_ir_mode mode) + enum als_ir_mode mode) { int ret = 0; switch (mode) { case MODE_ALS: ret = regmap_update_bits(chip->regmap, ISL29028_REG_CONFIGURE, - CONFIGURE_ALS_IR_MODE_MASK, CONFIGURE_ALS_IR_MODE_ALS); + CONFIGURE_ALS_IR_MODE_MASK, + CONFIGURE_ALS_IR_MODE_ALS); if (ret < 0) return ret; ret = regmap_update_bits(chip->regmap, ISL29028_REG_CONFIGURE, - CONFIGURE_ALS_RANGE_MASK, CONFIGURE_ALS_RANGE_HIGH_LUX); + CONFIGURE_ALS_RANGE_MASK, + CONFIGURE_ALS_RANGE_HIGH_LUX); break; case MODE_IR: ret = regmap_update_bits(chip->regmap, ISL29028_REG_CONFIGURE, - CONFIGURE_ALS_IR_MODE_MASK, CONFIGURE_ALS_IR_MODE_IR); + CONFIGURE_ALS_IR_MODE_MASK, + CONFIGURE_ALS_IR_MODE_IR); break; case MODE_NONE: @@ -152,7 +155,7 @@ static int isl29028_set_als_ir_mode(struct isl29028_chip *chip, /* Enable the ALS/IR */ ret = regmap_update_bits(chip->regmap, ISL29028_REG_CONFIGURE, - CONFIGURE_ALS_EN_MASK, CONFIGURE_ALS_EN); + CONFIGURE_ALS_EN_MASK, CONFIGURE_ALS_EN); if (ret < 0) return ret; @@ -193,7 +196,7 @@ static int isl29028_read_proxim(struct isl29028_chip *chip, int *prox) ret = regmap_read(chip->regmap, ISL29028_REG_PROX_DATA, &data); if (ret < 0) { dev_err(chip->dev, "Error in reading register %d, error %d\n", - ISL29028_REG_PROX_DATA, ret); + ISL29028_REG_PROX_DATA, ret); return ret; } *prox = data; @@ -264,7 +267,8 @@ static int isl29028_ir_get(struct isl29028_chip *chip, int *ir_data) /* Channel IO */ static int isl29028_write_raw(struct iio_dev *indio_dev, - struct iio_chan_spec const *chan, int val, int val2, long mask) + struct iio_chan_spec const *chan, + int val, int val2, long mask) { struct isl29028_chip *chip = iio_priv(indio_dev); int ret = -EINVAL; @@ -323,7 +327,8 @@ static int isl29028_write_raw(struct iio_dev *indio_dev, } static int isl29028_read_raw(struct iio_dev *indio_dev, - struct iio_chan_spec const *chan, int *val, int *val2, long mask) + struct iio_chan_spec const *chan, + int *val, int *val2, long mask) { struct isl29028_chip *chip = iio_priv(indio_dev); int ret = -EINVAL; @@ -476,7 +481,7 @@ static const struct regmap_config isl29028_regmap_config = { }; static int isl29028_probe(struct i2c_client *client, - const struct i2c_device_id *id) + const struct i2c_device_id *id) { struct isl29028_chip *chip; struct iio_dev *indio_dev; diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c index 3100d960fe2c..1aae05a6458e 100644 --- a/drivers/staging/iio/light/tsl2583.c +++ b/drivers/staging/iio/light/tsl2583.c @@ -482,7 +482,7 @@ static int taos_chip_off(struct iio_dev *indio_dev) /* Sysfs Interface Functions */ static ssize_t taos_power_state_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -491,7 +491,8 @@ static ssize_t taos_power_state_show(struct device *dev, } static ssize_t taos_power_state_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t len) + struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); int value; @@ -508,7 +509,7 @@ static ssize_t taos_power_state_store(struct device *dev, } static ssize_t taos_gain_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -533,7 +534,8 @@ static ssize_t taos_gain_show(struct device *dev, } static ssize_t taos_gain_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t len) + struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -564,13 +566,14 @@ static ssize_t taos_gain_store(struct device *dev, } static ssize_t taos_gain_available_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, + char *buf) { return sprintf(buf, "%s\n", "1 8 16 111"); } static ssize_t taos_als_time_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -579,7 +582,8 @@ static ssize_t taos_als_time_show(struct device *dev, } static ssize_t taos_als_time_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t len) + struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -600,14 +604,15 @@ static ssize_t taos_als_time_store(struct device *dev, } static ssize_t taos_als_time_available_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, + char *buf) { return sprintf(buf, "%s\n", "50 100 150 200 250 300 350 400 450 500 550 600 650"); } static ssize_t taos_als_trim_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -616,7 +621,8 @@ static ssize_t taos_als_trim_show(struct device *dev, } static ssize_t taos_als_trim_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t len) + struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -632,7 +638,8 @@ static ssize_t taos_als_trim_store(struct device *dev, } static ssize_t taos_als_cal_target_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, + char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -641,7 +648,8 @@ static ssize_t taos_als_cal_target_show(struct device *dev, } static ssize_t taos_als_cal_target_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t len) + struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -657,7 +665,7 @@ static ssize_t taos_als_cal_target_store(struct device *dev, } static ssize_t taos_lux_show(struct device *dev, struct device_attribute *attr, - char *buf) + char *buf) { int ret; @@ -669,7 +677,8 @@ static ssize_t taos_lux_show(struct device *dev, struct device_attribute *attr, } static ssize_t taos_do_calibrate(struct device *dev, - struct device_attribute *attr, const char *buf, size_t len) + struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); int value; @@ -684,7 +693,7 @@ static ssize_t taos_do_calibrate(struct device *dev, } static ssize_t taos_luxtable_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { int i; int offset = 0; @@ -707,7 +716,8 @@ static ssize_t taos_luxtable_show(struct device *dev, } static ssize_t taos_luxtable_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t len) + struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); @@ -809,7 +819,7 @@ static int taos_probe(struct i2c_client *clientp, struct iio_dev *indio_dev; if (!i2c_check_functionality(clientp->adapter, - I2C_FUNC_SMBUS_BYTE_DATA)) { + I2C_FUNC_SMBUS_BYTE_DATA)) { dev_err(&clientp->dev, "taos_probe() - i2c smbus byte data func unsupported\n"); return -EOPNOTSUPP; } @@ -846,7 +856,7 @@ static int taos_probe(struct i2c_client *clientp, if (!taos_tsl258x_device(buf)) { dev_info(&clientp->dev, - "i2c device found but does not match expected id in taos_probe()\n"); + "i2c device found but does not match expected id in taos_probe()\n"); return -EINVAL; }