aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-09-25 10:27:15 -0400
committerJonathan Cameron <jic23@kernel.org>2015-01-05 13:59:58 -0500
commit0a01db9d64350754f5d714d44dab81cb97a67a81 (patch)
tree94d073d094ec75d83a696567b4ebe89a9e5daff9
parent9251d14a275878879400eefae7601c3ee7ee9d71 (diff)
staging:iio:ad5933: Remove platform data from state struct
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> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/staging/iio/impedance-analyzer/ad5933.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index d18a8ecc1245..e90653ff9159 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -89,7 +89,6 @@
89struct ad5933_state { 89struct ad5933_state {
90 struct i2c_client *client; 90 struct i2c_client *client;
91 struct regulator *reg; 91 struct regulator *reg;
92 struct ad5933_platform_data *pdata;
93 struct delayed_work work; 92 struct delayed_work work;
94 unsigned long mclk_hz; 93 unsigned long mclk_hz;
95 unsigned char ctrl_hb; 94 unsigned char ctrl_hb;
@@ -712,9 +711,7 @@ static int ad5933_probe(struct i2c_client *client,
712 st->client = client; 711 st->client = client;
713 712
714 if (!pdata) 713 if (!pdata)
715 st->pdata = &ad5933_default_pdata; 714 pdata = &ad5933_default_pdata;
716 else
717 st->pdata = pdata;
718 715
719 st->reg = devm_regulator_get(&client->dev, "vcc"); 716 st->reg = devm_regulator_get(&client->dev, "vcc");
720 if (!IS_ERR(st->reg)) { 717 if (!IS_ERR(st->reg)) {
@@ -727,10 +724,10 @@ static int ad5933_probe(struct i2c_client *client,
727 if (voltage_uv) 724 if (voltage_uv)
728 st->vref_mv = voltage_uv / 1000; 725 st->vref_mv = voltage_uv / 1000;
729 else 726 else
730 st->vref_mv = st->pdata->vref_mv; 727 st->vref_mv = pdata->vref_mv;
731 728
732 if (st->pdata->ext_clk_Hz) { 729 if (pdata->ext_clk_Hz) {
733 st->mclk_hz = st->pdata->ext_clk_Hz; 730 st->mclk_hz = pdata->ext_clk_Hz;
734 st->ctrl_lb = AD5933_CTRL_EXT_SYSCLK; 731 st->ctrl_lb = AD5933_CTRL_EXT_SYSCLK;
735 } else { 732 } else {
736 st->mclk_hz = AD5933_INT_OSC_FREQ_Hz; 733 st->mclk_hz = AD5933_INT_OSC_FREQ_Hz;