staging:iio:core set the iio_dev.info pointer to null on unregister under lock.
authorJonathan Cameron <jic23@kernel.org>
Wed, 15 Feb 2012 19:48:00 +0000 (19:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 20:10:02 +0000 (12:10 -0800)
commitac917a81117ce0286847666b55dd265f6cda8383
treeea5052ebeb55cc59fc0f3fa28df1560ddfa487f3
parent08cd9ef4eca0b53cdae190b718e4945408c7d3b8
staging:iio:core set the iio_dev.info pointer to null on unregister under lock.

This prevents use of provider callbacks after it has been unregistered.
Note that all code using this that can be called from a consumer *must*
check the pointer before using and hold the info_exist_lock throughout
the usage of the callbacks in info.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/iio.h
drivers/staging/iio/industrialio-core.c