diff options
author | Angel Iglesias <ang.iglesiasg@gmail.com> | 2023-10-22 20:22:19 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-11-16 22:10:27 +0300 |
commit | 48245f4a8c093f0c06f82b235a9e0dd766dc20df (patch) | |
tree | 2905562ef91b4c1b9cb7165ebb56ed99e303843f /drivers/iio/pressure/bmp280-spi.c | |
parent | faac4dda9a91f94d96cb38676ca4177a54666d75 (diff) | |
download | linux-48245f4a8c093f0c06f82b235a9e0dd766dc20df.tar.xz |
iio: pressure: bmp280: Rearrange vars in reverse xmas tree order
Small cleanup reordering local variable declarations following reverse
christmas tree convention.
Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/bb63a996eb9c4555bf83471770f0169d2627e79c.1697994521.git.ang.iglesiasg@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/pressure/bmp280-spi.c')
-rw-r--r-- | drivers/iio/pressure/bmp280-spi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c index 2eed483a8cc4..433d6fac83c4 100644 --- a/drivers/iio/pressure/bmp280-spi.c +++ b/drivers/iio/pressure/bmp280-spi.c @@ -14,8 +14,7 @@ static int bmp280_regmap_spi_write(void *context, const void *data, size_t count) { - struct device *dev = context; - struct spi_device *spi = to_spi_device(dev); + struct spi_device *spi = to_spi_device(context); u8 buf[2]; memcpy(buf, data, 2); @@ -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, size_t reg_size, void *val, size_t val_size) { - struct device *dev = context; - struct spi_device *spi = to_spi_device(dev); + struct spi_device *spi = to_spi_device(context); return spi_write_then_read(spi, reg, reg_size, val, val_size); } |