]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf1faff814dc820fd0ccd562888ea0633b29e4d6f
tree5e9f9612c77a55b6f293279543388ee1b79bc110
parent8cf4141f5189c95545734d6df38f1fa116ef816b
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