OSDN Git Service

iio: exynos_adc: use indio_dev->dev structure to handle child nodes
authorNaveen Krishna Ch <ch.naveen@samsung.com>
Fri, 25 Apr 2014 10:14:00 +0000 (11:14 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 26 Apr 2014 10:19:40 +0000 (11:19 +0100)
commit3d821a1747a0abbb7a179af10188ad7ad9b35b72
tree5e9f9612c77a55b6f293279543388ee1b79bc110
parentb9b3a41893c3f1be67b5aacfa525969914bea0e9
iio: exynos_adc: use indio_dev->dev structure to handle child nodes

Using pdev->dev with device_for_each_child() would iterate over all
of the children of the platform device and delete them.
Thus, causing crashes during module unload.

We should be using the indio_dev->dev structure for
registering/unregistering child nodes.

Reported-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/exynos_adc.c