linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Graff Yang <graff.yang@gmail.com>
Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	daniel.baluta@nxp.com, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] staging:iio:ad2s1210: Remove old_data from ad2s1210_state
Date: Fri, 9 Mar 2018 20:46:25 -0300	[thread overview]
Message-ID: <c622bde87a9e1ed5ddf89b999231c69579b7d2e6.1520638889.git.rodrigosiqueiramelo@gmail.com> (raw)
In-Reply-To: <cover.1520638889.git.rodrigosiqueiramelo@gmail.com>

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(-)

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];
 }
-- 
2.16.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2018-03-09 23:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 23:45 [PATCH 0/4] staging:iio:ad2s1210: Driver cleanup Rodrigo Siqueira
2018-03-09 23:45 ` [PATCH 1/4] staging:iio:ad2s1210: Remove end of line with '[' Rodrigo Siqueira
2018-03-10 16:41   ` Jonathan Cameron
2018-03-09 23:46 ` [PATCH 2/4] staging:iio:ad2s1210: Remove unused #define directive Rodrigo Siqueira
2018-03-10 16:45   ` Jonathan Cameron
2018-03-09 23:46 ` Rodrigo Siqueira [this message]
2018-03-10 17:21   ` [PATCH 3/4] staging:iio:ad2s1210: Remove old_data from ad2s1210_state Jonathan Cameron
2018-03-09 23:46 ` [PATCH 4/4] staging:iio:ad2s1210: Add comments/documentation Rodrigo Siqueira
2018-03-10 17:52   ` Jonathan Cameron
2018-03-12 12:25     ` Rodrigo Siqueira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c622bde87a9e1ed5ddf89b999231c69579b7d2e6.1520638889.git.rodrigosiqueiramelo@gmail.com \
    --to=rodrigosiqueiramelo@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=daniel.baluta@nxp.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=graff.yang@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).