All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming
@ 2018-02-13 22:36 Richard Lai
  2018-02-17 14:12 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Lai @ 2018-02-13 22:36 UTC (permalink / raw)
  Cc: richard, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Narcisa Ana Maria Vasile, linux-iio,
	linux-kernel

This particular constant was named with prefix "CCS881", which should be
"CCS811" instead, just like the rest of constant names in the file, as this
driver implementation is for AMS CCS811 sensor. "CCS881" could literally be
referring to another sensor product unrelated to AMS CCS811 sensor.

Signed-off-by: Richard Lai <richard@richardman.com>
---
 drivers/iio/chemical/ccs811.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
index 840a6cb..8e8beb7 100644
--- a/drivers/iio/chemical/ccs811.c
+++ b/drivers/iio/chemical/ccs811.c
@@ -31,7 +31,7 @@
 #define CCS811_ALG_RESULT_DATA	0x02
 #define CCS811_RAW_DATA		0x03
 #define CCS811_HW_ID		0x20
-#define CCS881_HW_ID_VALUE	0x81
+#define CCS811_HW_ID_VALUE	0x81
 #define CCS811_HW_VERSION	0x21
 #define CCS811_HW_VERSION_VALUE	0x10
 #define CCS811_HW_VERSION_MASK	0xF0
@@ -315,7 +315,7 @@ static int ccs811_probe(struct i2c_client *client,
 	if (ret < 0)
 		return ret;
 
-	if (ret != CCS881_HW_ID_VALUE) {
+	if (ret != CCS811_HW_ID_VALUE) {
 		dev_err(&client->dev, "hardware id doesn't match CCS81x\n");
 		return -ENODEV;
 	}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming
  2018-02-13 22:36 [PATCH] iio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming Richard Lai
@ 2018-02-17 14:12 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2018-02-17 14:12 UTC (permalink / raw)
  To: Richard Lai
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Narcisa Ana Maria Vasile, linux-iio, linux-kernel

On Tue, 13 Feb 2018 22:36:57 +0000
Richard Lai <richard@richardman.com> wrote:

> This particular constant was named with prefix "CCS881", which should be
> "CCS811" instead, just like the rest of constant names in the file, as this
> driver implementation is for AMS CCS811 sensor. "CCS881" could literally be
> referring to another sensor product unrelated to AMS CCS811 sensor.
> 
> Signed-off-by: Richard Lai <richard@richardman.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/chemical/ccs811.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
> index 840a6cb..8e8beb7 100644
> --- a/drivers/iio/chemical/ccs811.c
> +++ b/drivers/iio/chemical/ccs811.c
> @@ -31,7 +31,7 @@
>  #define CCS811_ALG_RESULT_DATA	0x02
>  #define CCS811_RAW_DATA		0x03
>  #define CCS811_HW_ID		0x20
> -#define CCS881_HW_ID_VALUE	0x81
> +#define CCS811_HW_ID_VALUE	0x81
>  #define CCS811_HW_VERSION	0x21
>  #define CCS811_HW_VERSION_VALUE	0x10
>  #define CCS811_HW_VERSION_MASK	0xF0
> @@ -315,7 +315,7 @@ static int ccs811_probe(struct i2c_client *client,
>  	if (ret < 0)
>  		return ret;
>  
> -	if (ret != CCS881_HW_ID_VALUE) {
> +	if (ret != CCS811_HW_ID_VALUE) {
>  		dev_err(&client->dev, "hardware id doesn't match CCS81x\n");
>  		return -ENODEV;
>  	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-17 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 22:36 [PATCH] iio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming Richard Lai
2018-02-17 14:12 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.