Commit 48245f4a authored by Angel Iglesias's avatar Angel Iglesias Committed by Jonathan Cameron

iio: pressure: bmp280: Rearrange vars in reverse xmas tree order

Small cleanup reordering local variable declarations following reverse
christmas tree convention.
Signed-off-by: default avatarAngel Iglesias <ang.iglesiasg@gmail.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/bb63a996eb9c4555bf83471770f0169d2627e79c.1697994521.git.ang.iglesiasg@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent faac4dda
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
static int bmp280_i2c_probe(struct i2c_client *client) static int bmp280_i2c_probe(struct i2c_client *client)
{ {
struct regmap *regmap;
const struct bmp280_chip_info *chip_info;
const struct i2c_device_id *id = i2c_client_get_device_id(client); const struct i2c_device_id *id = i2c_client_get_device_id(client);
const struct bmp280_chip_info *chip_info;
struct regmap *regmap;
chip_info = i2c_get_match_data(client); chip_info = i2c_get_match_data(client);
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
static int bmp280_regmap_spi_write(void *context, const void *data, static int bmp280_regmap_spi_write(void *context, const void *data,
size_t count) size_t count)
{ {
struct device *dev = context; struct spi_device *spi = to_spi_device(context);
struct spi_device *spi = to_spi_device(dev);
u8 buf[2]; u8 buf[2];
memcpy(buf, data, 2); memcpy(buf, data, 2);
...@@ -31,8 +30,7 @@ static int bmp280_regmap_spi_write(void *context, const void *data, ...@@ -31,8 +30,7 @@ static int bmp280_regmap_spi_write(void *context, const void *data,
static int bmp280_regmap_spi_read(void *context, const void *reg, static int bmp280_regmap_spi_read(void *context, const void *reg,
size_t reg_size, void *val, size_t val_size) size_t reg_size, void *val, size_t val_size)
{ {
struct device *dev = context; struct spi_device *spi = to_spi_device(context);
struct spi_device *spi = to_spi_device(dev);
return spi_write_then_read(spi, reg, reg_size, val, val_size); return spi_write_then_read(spi, reg, reg_size, val, val_size);
} }
......
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