summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/exynos_adc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-30 14:19:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-30 14:19:23 -0700
commit86281966c7395aa9a13a20c52e26005f5e142451 (patch)
treea4a14499819cc861ac8939935883c2840b0ba216 /drivers/iio/adc/exynos_adc.c
parentd1db0eea852497762cab43b905b879dfcd3b8987 (diff)
parentbbc28134e915d2e2e8cac0254d1d056db0ae3247 (diff)
Merge tag 'iio-fixes-for-3.15b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linusstaging-3.15-rc4
Jonathan writes: Second set of fixes for IIO in the 3.15 cycle. * ad2s1200 - Fix some missing parenthesis in a for statement that could have led to an error being missed when getting gpios. * Fix a null derefference issue in the mpu6050 when platform data is not provided (or is provided via the device tree for example). * exynos_adc bug on remove due to child devices having been added to the parent of the IIO device rather than the IIO device itself. This caused an issue with the IIO device removing itself in it's remove function. * Make all ADC drivers buildable as modules to avoid dependency issues if the IIO core is itself built as a module. The exynos adc bug became apparently whilst this fix was being tested.
Diffstat (limited to 'drivers/iio/adc/exynos_adc.c')
-rw-r--r--drivers/iio/adc/exynos_adc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index d25b262193a7..affa93f51789 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -344,7 +344,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
exynos_adc_hw_init(info);
- ret = of_platform_populate(np, exynos_adc_match, NULL, &pdev->dev);
+ ret = of_platform_populate(np, exynos_adc_match, NULL, &indio_dev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "failed adding child nodes\n");
goto err_of_populate;
@@ -353,7 +353,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
return 0;
err_of_populate:
- device_for_each_child(&pdev->dev, NULL,
+ device_for_each_child(&indio_dev->dev, NULL,
exynos_adc_remove_devices);
regulator_disable(info->vdd);
clk_disable_unprepare(info->clk);
@@ -369,7 +369,7 @@ static int exynos_adc_remove(struct platform_device *pdev)
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
struct exynos_adc *info = iio_priv(indio_dev);
- device_for_each_child(&pdev->dev, NULL,
+ device_for_each_child(&indio_dev->dev, NULL,
exynos_adc_remove_devices);
regulator_disable(info->vdd);
clk_disable_unprepare(info->clk);