Skip to content
Commit b2d226ca authored by William Breathitt Gray's avatar William Breathitt Gray Committed by Jonathan Cameron
Browse files

iio: stx104: Utilize devm_ functions in driver probe callback



The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call and
iio_device_register call with the devm_gpiochip_add_data call and
devm_iio_device_register call respectively. In addition, the
stx104_remove function has been removed as no longer necessary due to
the use of the relevant devm_ resource manager functions.

Signed-off-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 75de5546
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