linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Daniel Baluta <daniel.baluta@intel.com>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH v2 4/4] staging:iio:ad5933: Remove platform data from state struct
Date: Sun, 04 Jan 2015 17:55:21 +0000	[thread overview]
Message-ID: <54A97E89.30109@kernel.org> (raw)
In-Reply-To: <1411655235-7635-4-git-send-email-lars@metafoo.de>

On 25/09/14 15:27, Lars-Peter Clausen wrote:
> The platform data is only used in the probe function. No need to keep it
> around.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied.
> ---
> No changes since v1
> ---
>  drivers/staging/iio/impedance-analyzer/ad5933.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
> index 95b17c5..3c5d917 100644
> --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> @@ -89,7 +89,6 @@
>  struct ad5933_state {
>  	struct i2c_client		*client;
>  	struct regulator		*reg;
> -	struct ad5933_platform_data	*pdata;
>  	struct delayed_work		work;
>  	unsigned long			mclk_hz;
>  	unsigned char			ctrl_hb;
> @@ -712,9 +711,7 @@ static int ad5933_probe(struct i2c_client *client,
>  	st->client = client;
>  
>  	if (!pdata)
> -		st->pdata = &ad5933_default_pdata;
> -	else
> -		st->pdata = pdata;
> +		pdata = &ad5933_default_pdata;
>  
>  	st->reg = devm_regulator_get(&client->dev, "vcc");
>  	if (!IS_ERR(st->reg)) {
> @@ -727,10 +724,10 @@ static int ad5933_probe(struct i2c_client *client,
>  	if (voltage_uv)
>  		st->vref_mv = voltage_uv / 1000;
>  	else
> -		st->vref_mv = st->pdata->vref_mv;
> +		st->vref_mv = pdata->vref_mv;
>  
> -	if (st->pdata->ext_clk_Hz) {
> -		st->mclk_hz = st->pdata->ext_clk_Hz;
> +	if (pdata->ext_clk_Hz) {
> +		st->mclk_hz = pdata->ext_clk_Hz;
>  		st->ctrl_lb = AD5933_CTRL_EXT_SYSCLK;
>  	} else {
>  		st->mclk_hz = AD5933_INT_OSC_FREQ_Hz;
> 


  reply	other threads:[~2015-01-04 17:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 14:27 [PATCH v2 1/4] staging:iio:ad5933: Fix NULL pointer deref when enabling buffer Lars-Peter Clausen
2014-09-25 14:27 ` [PATCH v2 2/4] staging:iio:ad5933: Drop "raw" from channel names Lars-Peter Clausen
2014-09-25 14:27 ` [PATCH v2 3/4] staging:iio:ad5933: Report temperature as raw value Lars-Peter Clausen
2014-09-27  9:52   ` Jonathan Cameron
2015-01-04 17:55     ` Jonathan Cameron
2014-09-25 14:27 ` [PATCH v2 4/4] staging:iio:ad5933: Remove platform data from state struct Lars-Peter Clausen
2015-01-04 17:55   ` Jonathan Cameron [this message]
2014-09-27  9:35 ` [PATCH v2 1/4] staging:iio:ad5933: Fix NULL pointer deref when enabling buffer Jonathan Cameron
2014-09-27 20:35   ` Lars-Peter Clausen

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=54A97E89.30109@kernel.org \
    --to=jic23@kernel.org \
    --cc=daniel.baluta@intel.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@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).