The value of frequency is taken from ad9834.c instead of platform data Signed-off-by: Beniamin Bia <beniamin.bia@xxxxxxxxxx> --- drivers/staging/iio/frequency/ad9834.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c index 995acdd7c942..d92d4bf71261 100644 --- a/drivers/staging/iio/frequency/ad9834.c +++ b/drivers/staging/iio/frequency/ad9834.c @@ -99,6 +99,16 @@ enum ad9834_supported_device_ids { ID_AD9838, }; +static struct ad9834_platform_data default_config = { + .mclk = 25000000, + .freq0 = 1000000, + .freq1 = 5000000, + .phase0 = 512, + .phase1 = 1024, + .en_div2 = false, + .en_signbit_msb_out = false, +}; + static unsigned int ad9834_calc_freqreg(unsigned long mclk, unsigned long fout) { unsigned long long freqreg = (u64)fout * (u64)BIT(AD9834_FREQ_BITS); @@ -391,16 +401,13 @@ static const struct iio_info ad9833_info = { static int ad9834_probe(struct spi_device *spi) { - struct ad9834_platform_data *pdata = dev_get_platdata(&spi->dev); + struct ad9834_platform_data *pdata; struct ad9834_state *st; struct iio_dev *indio_dev; struct regulator *reg; int ret; - if (!pdata) { - dev_dbg(&spi->dev, "no platform data?\n"); - return -ENODEV; - } + pdata = &default_config; reg = devm_regulator_get(&spi->dev, "avdd"); if (IS_ERR(reg)) -- 2.17.1