diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-05-21 17:49:22 +0200 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-06-12 18:36:31 +0200 |
commit | 0ead4fb22a5f1b31fee966117604e3be9cdeb2fb (patch) | |
tree | 7f7cd61ca8f1b918a62dcdc1e32219faff9084cb /drivers/iio/adc/ti_am335x_adc.c | |
parent | 6f39ac4e20c6211c98e8d9da2d8c51100a77d1df (diff) | |
download | lwn-0ead4fb22a5f1b31fee966117604e3be9cdeb2fb.tar.gz lwn-0ead4fb22a5f1b31fee966117604e3be9cdeb2fb.zip |
iio: ti_am335x_adc: remove platform_data support
This patch removes access to platform data mfd_tscadc_board because the
platform is DT only.
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'drivers/iio/adc/ti_am335x_adc.c')
-rw-r--r-- | drivers/iio/adc/ti_am335x_adc.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index b24402cb5432..2868c0c1b7e0 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c @@ -26,7 +26,6 @@ #include <linux/of_device.h> #include <linux/mfd/ti_am335x_tscadc.h> -#include <linux/platform_data/ti_am335x_adc.h> struct tiadc_device { struct ti_tscadc_dev *mfd_tscadc; @@ -153,14 +152,12 @@ static int tiadc_probe(struct platform_device *pdev) { struct iio_dev *indio_dev; struct tiadc_device *adc_dev; - struct ti_tscadc_dev *tscadc_dev = ti_tscadc_dev_get(pdev); - struct mfd_tscadc_board *pdata = tscadc_dev->dev->platform_data; struct device_node *node = pdev->dev.of_node; int err; u32 val32; - if (!pdata && !node) { - dev_err(&pdev->dev, "Could not find platform data\n"); + if (!node) { + dev_err(&pdev->dev, "Could not find valid DT data.\n"); return -EINVAL; } @@ -174,15 +171,11 @@ static int tiadc_probe(struct platform_device *pdev) adc_dev->mfd_tscadc = ti_tscadc_dev_get(pdev); - if (pdata) - adc_dev->channels = pdata->adc_init->adc_channels; - else { - err = of_property_read_u32(node, - "ti,adc-channels", &val32); - if (err < 0) - goto err_free_device; - adc_dev->channels = val32; - } + err = of_property_read_u32(node, + "ti,adc-channels", &val32); + if (err < 0) + goto err_free_device; + adc_dev->channels = val32; indio_dev->dev.parent = &pdev->dev; indio_dev->name = dev_name(&pdev->dev); |