diff mbox series

[v6,6/9] iio: pressure: bmp280: reorder i2c device tables declarations

Message ID a3969b60e428b9bd29ea1ebc6dd69aa5bbe59da0.1663025017.git.ang.iglesiasg@gmail.com (mailing list archive)
State Accepted
Headers show
Series Add support for pressure sensor Bosch BMP380 | expand

Commit Message

Angel Iglesias Sept. 12, 2022, 11:50 p.m. UTC
Change device tables declarations to forward order like in SPI codepath.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
---
 drivers/iio/pressure/bmp280-i2c.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Jonathan Cameron Sept. 17, 2022, 1:18 p.m. UTC | #1
On Tue, 13 Sep 2022 01:50:07 +0200
Angel Iglesias <ang.iglesiasg@gmail.com> wrote:

> Change device tables declarations to forward order like in SPI codepath.
> 
> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Applied
> ---
>  drivers/iio/pressure/bmp280-i2c.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c
> index bf4a7a617537..5b51ebfc6f2b 100644
> --- a/drivers/iio/pressure/bmp280-i2c.c
> +++ b/drivers/iio/pressure/bmp280-i2c.c
> @@ -37,18 +37,18 @@ static int bmp280_i2c_probe(struct i2c_client *client,
>  }
>  
>  static const struct of_device_id bmp280_of_i2c_match[] = {
> -	{ .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
> -	{ .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
> -	{ .compatible = "bosch,bmp180", .data = (void *)BMP180_CHIP_ID },
>  	{ .compatible = "bosch,bmp085", .data = (void *)BMP180_CHIP_ID },
> +	{ .compatible = "bosch,bmp180", .data = (void *)BMP180_CHIP_ID },
> +	{ .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
> +	{ .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(of, bmp280_of_i2c_match);
>  
>  static const struct i2c_device_id bmp280_i2c_id[] = {
> -	{"bmp280", BMP280_CHIP_ID },
> -	{"bmp180", BMP180_CHIP_ID },
>  	{"bmp085", BMP180_CHIP_ID },
> +	{"bmp180", BMP180_CHIP_ID },
> +	{"bmp280", BMP280_CHIP_ID },
>  	{"bme280", BME280_CHIP_ID },
>  	{ },
>  };
diff mbox series

Patch

diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c
index bf4a7a617537..5b51ebfc6f2b 100644
--- a/drivers/iio/pressure/bmp280-i2c.c
+++ b/drivers/iio/pressure/bmp280-i2c.c
@@ -37,18 +37,18 @@  static int bmp280_i2c_probe(struct i2c_client *client,
 }
 
 static const struct of_device_id bmp280_of_i2c_match[] = {
-	{ .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
-	{ .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
-	{ .compatible = "bosch,bmp180", .data = (void *)BMP180_CHIP_ID },
 	{ .compatible = "bosch,bmp085", .data = (void *)BMP180_CHIP_ID },
+	{ .compatible = "bosch,bmp180", .data = (void *)BMP180_CHIP_ID },
+	{ .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
+	{ .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, bmp280_of_i2c_match);
 
 static const struct i2c_device_id bmp280_i2c_id[] = {
-	{"bmp280", BMP280_CHIP_ID },
-	{"bmp180", BMP180_CHIP_ID },
 	{"bmp085", BMP180_CHIP_ID },
+	{"bmp180", BMP180_CHIP_ID },
+	{"bmp280", BMP280_CHIP_ID },
 	{"bme280", BME280_CHIP_ID },
 	{ },
 };