Skip to content
Commit 6ff0199a authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron
Browse files

iio: adc: ti_am335x_adc: alloc channels via devm_kcalloc()



This change attaches the life-cycle of the channels array to the parent
device object that is attached to the IIO device.
This way we can remove from the cleanup code, the explicit
tiadc_channels_remove() which simply does a kfree() on the channels array.

Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent a07a4fe5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment