iio: adc: xilinx: prevent touching unclocked h/w on remove
authorSven Van Asbroeck <thesven73@gmail.com>
Sun, 10 Mar 2019 18:58:26 +0000 (14:58 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Mar 2019 15:49:56 +0000 (15:49 +0000)
commit2e4b88f73966adead360e47621df0183586fac32
treef669a42923202901eee174bb40c1ba839f63c1b0
parent862e4644fd2d7df8998edc65e0963ea2f567bde9
iio: adc: xilinx: prevent touching unclocked h/w on remove

In remove, the clock is disabled before canceling the
delayed work. This means that the delayed work may be
touching unclocked hardware.

Fix by disabling the clock after the delayed work is
fully canceled. This is consistent with the probe error
path order.

Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/xilinx-xadc-core.c