iio: adc: adi-axi-adc: Fix object reference counting
authorNuno Sá <nuno.sa@analog.com>
Wed, 1 Jul 2020 12:04:41 +0000 (14:04 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 4 Jul 2020 16:05:50 +0000 (17:05 +0100)
commite9c6004eef0019375e4b0339f1f88d9d6ed99018
tree09d68b482e4f7e27815ac34baf4ca5373fef3e4e
parentd88de040e1df38414fc1e4380be9d0e997ab4d58
iio: adc: adi-axi-adc: Fix object reference counting

When looking for a registered client to attach with, the wrong reference
counters are being grabbed. The idea is to increment the module and device
counters of the client device and not the counters of the axi device being
probed.

Fixes: ef04070692a2 (iio: adc: adi-axi-adc: add support for AXI ADC IP core)
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/adi-axi-adc.c