Skip to content

Commit 0a01db9

Browse files
larsclausenjic23
authored andcommitted
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 <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 9251d14 commit 0a01db9

File tree

1 file changed

+4
-7
lines changed
  • drivers/staging/iio/impedance-analyzer

1 file changed

+4
-7
lines changed

drivers/staging/iio/impedance-analyzer/ad5933.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
struct ad5933_state {
9090
struct i2c_client *client;
9191
struct regulator *reg;
92-
struct ad5933_platform_data *pdata;
9392
struct delayed_work work;
9493
unsigned long mclk_hz;
9594
unsigned char ctrl_hb;
@@ -712,9 +711,7 @@ static int ad5933_probe(struct i2c_client *client,
712711
st->client = client;
713712

714713
if (!pdata)
715-
st->pdata = &ad5933_default_pdata;
716-
else
717-
st->pdata = pdata;
714+
pdata = &ad5933_default_pdata;
718715

719716
st->reg = devm_regulator_get(&client->dev, "vcc");
720717
if (!IS_ERR(st->reg)) {
@@ -727,10 +724,10 @@ static int ad5933_probe(struct i2c_client *client,
727724
if (voltage_uv)
728725
st->vref_mv = voltage_uv / 1000;
729726
else
730-
st->vref_mv = st->pdata->vref_mv;
727+
st->vref_mv = pdata->vref_mv;
731728

732-
if (st->pdata->ext_clk_Hz) {
733-
st->mclk_hz = st->pdata->ext_clk_Hz;
729+
if (pdata->ext_clk_Hz) {
730+
st->mclk_hz = pdata->ext_clk_Hz;
734731
st->ctrl_lb = AD5933_CTRL_EXT_SYSCLK;
735732
} else {
736733
st->mclk_hz = AD5933_INT_OSC_FREQ_Hz;

0 commit comments

Comments
 (0)