diff mbox

[3/4] staging:iio:ad2s1210: Remove old_data from ad2s1210_state

Message ID c622bde87a9e1ed5ddf89b999231c69579b7d2e6.1520638889.git.rodrigosiqueiramelo@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rodrigo Siqueira March 9, 2018, 11:46 p.m. UTC
The variable old_data is a bool type, which only receives the value
'true' in the function ad2s1210_config_write and ad2s1210_config_read.
There is no other use for this variable. This patch removes old_data
from the ad2s1210_state and from all the function that use it.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
---
 drivers/staging/iio/resolver/ad2s1210.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jonathan Cameron March 10, 2018, 5:21 p.m. UTC | #1
On Fri, 9 Mar 2018 20:46:25 -0300
Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> wrote:

> The variable old_data is a bool type, which only receives the value
> 'true' in the function ad2s1210_config_write and ad2s1210_config_read.
> There is no other use for this variable. This patch removes old_data
> from the ad2s1210_state and from all the function that use it.
> 
> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Applied.

Thanks,

Jonathan

> ---
>  drivers/staging/iio/resolver/ad2s1210.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
> index 79cb56670fc2..ac13b99bd9cb 100644
> --- a/drivers/staging/iio/resolver/ad2s1210.c
> +++ b/drivers/staging/iio/resolver/ad2s1210.c
> @@ -76,7 +76,6 @@ struct ad2s1210_state {
>  	unsigned int fclkin;
>  	unsigned int fexcit;
>  	bool hysteresis;
> -	bool old_data;
>  	u8 resolution;
>  	enum ad2s1210_mode mode;
>  	u8 rx[2] ____cacheline_aligned;
> @@ -107,7 +106,6 @@ static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data)
>  	ret = spi_write(st->sdev, st->tx, 1);
>  	if (ret < 0)
>  		return ret;
> -	st->old_data = true;
>  
>  	return 0;
>  }
> @@ -129,7 +127,6 @@ static int ad2s1210_config_read(struct ad2s1210_state *st,
>  	ret = spi_sync_transfer(st->sdev, &xfer, 1);
>  	if (ret < 0)
>  		return ret;
> -	st->old_data = true;
>  
>  	return st->rx[1];
>  }

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index 79cb56670fc2..ac13b99bd9cb 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -76,7 +76,6 @@  struct ad2s1210_state {
 	unsigned int fclkin;
 	unsigned int fexcit;
 	bool hysteresis;
-	bool old_data;
 	u8 resolution;
 	enum ad2s1210_mode mode;
 	u8 rx[2] ____cacheline_aligned;
@@ -107,7 +106,6 @@  static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data)
 	ret = spi_write(st->sdev, st->tx, 1);
 	if (ret < 0)
 		return ret;
-	st->old_data = true;
 
 	return 0;
 }
@@ -129,7 +127,6 @@  static int ad2s1210_config_read(struct ad2s1210_state *st,
 	ret = spi_sync_transfer(st->sdev, &xfer, 1);
 	if (ret < 0)
 		return ret;
-	st->old_data = true;
 
 	return st->rx[1];
 }