mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
iio: accel: mma8452: cleanup codestyle warning
Reported by checkpatch: FILE: drivers/iio/accel/mma8452.c CHECK: Alignment should match open parenthesis Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
0a6726ec20
commit
b4f6b12446
|
|
@ -706,8 +706,8 @@ static int mma8452_set_hp_filter_frequency(struct mma8452_data *data,
|
|||
}
|
||||
|
||||
static int __mma8452_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 mma8452_data *data = iio_priv(indio_dev);
|
||||
int i, j, ret;
|
||||
|
|
@ -788,8 +788,9 @@ static int mma8452_write_raw(struct iio_dev *indio_dev,
|
|||
}
|
||||
|
||||
static int mma8452_get_event_regs(struct mma8452_data *data,
|
||||
const struct iio_chan_spec *chan, enum iio_event_direction dir,
|
||||
const struct mma8452_event_regs **ev_reg)
|
||||
const struct iio_chan_spec *chan,
|
||||
enum iio_event_direction dir,
|
||||
const struct mma8452_event_regs **ev_reg)
|
||||
{
|
||||
if (!chan)
|
||||
return -EINVAL;
|
||||
|
|
@ -818,11 +819,11 @@ static int mma8452_get_event_regs(struct mma8452_data *data,
|
|||
}
|
||||
|
||||
static int mma8452_read_event_value(struct iio_dev *indio_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)
|
||||
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 mma8452_data *data = iio_priv(indio_dev);
|
||||
int ret, us, power_mode;
|
||||
|
|
@ -881,11 +882,11 @@ static int mma8452_read_event_value(struct iio_dev *indio_dev,
|
|||
}
|
||||
|
||||
static int mma8452_write_event_value(struct iio_dev *indio_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)
|
||||
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 mma8452_data *data = iio_priv(indio_dev);
|
||||
int ret, reg, steps;
|
||||
|
|
@ -955,8 +956,7 @@ static int mma8452_read_event_config(struct iio_dev *indio_dev,
|
|||
case IIO_EV_DIR_FALLING:
|
||||
return mma8452_freefall_mode_enabled(data);
|
||||
case IIO_EV_DIR_RISING:
|
||||
ret = i2c_smbus_read_byte_data(data->client,
|
||||
ev_regs->ev_cfg);
|
||||
ret = i2c_smbus_read_byte_data(data->client, ev_regs->ev_cfg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -1193,7 +1193,7 @@ static const struct attribute_group mma8452_event_attribute_group = {
|
|||
|
||||
static const struct iio_mount_matrix *
|
||||
mma8452_get_mount_matrix(const struct iio_dev *indio_dev,
|
||||
const struct iio_chan_spec *chan)
|
||||
const struct iio_chan_spec *chan)
|
||||
{
|
||||
struct mma8452_data *data = iio_priv(indio_dev);
|
||||
|
||||
|
|
@ -1516,8 +1516,9 @@ static int mma8452_reset(struct i2c_client *client)
|
|||
* The following code will read the reset register, and check whether
|
||||
* this reset works.
|
||||
*/
|
||||
i2c_smbus_write_byte_data(client, MMA8452_CTRL_REG2,
|
||||
MMA8452_CTRL_REG2_RST);
|
||||
i2c_smbus_write_byte_data(client,
|
||||
MMA8452_CTRL_REG2,
|
||||
MMA8452_CTRL_REG2_RST);
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
usleep_range(100, 200);
|
||||
|
|
@ -1647,8 +1648,8 @@ static int mma8452_probe(struct i2c_client *client)
|
|||
dev_dbg(&client->dev, "using interrupt line INT2\n");
|
||||
} else {
|
||||
ret = i2c_smbus_write_byte_data(client,
|
||||
MMA8452_CTRL_REG5,
|
||||
data->chip_info->all_events);
|
||||
MMA8452_CTRL_REG5,
|
||||
data->chip_info->all_events);
|
||||
if (ret < 0)
|
||||
goto disable_regulators;
|
||||
|
||||
|
|
@ -1656,8 +1657,8 @@ static int mma8452_probe(struct i2c_client *client)
|
|||
}
|
||||
|
||||
ret = i2c_smbus_write_byte_data(client,
|
||||
MMA8452_CTRL_REG4,
|
||||
data->chip_info->enabled_events);
|
||||
MMA8452_CTRL_REG4,
|
||||
data->chip_info->enabled_events);
|
||||
if (ret < 0)
|
||||
goto disable_regulators;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user