Skip to content
Commit 8ff14ee8 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: usbdux: cleanup the (*detach)



The tidy_up() function is only called by the (*detach). That function
unlinks any running urbs and frees all the allocated urbs and buffers
used by the driver.

Rename tidy_up() to usbdux_free_usb_buffers() and move all the parts
that don't deal with the freeing of the buffers directly into the
(*detach).

Also, remove all the unnecessary clearing of the pointers. The comedi
core will kfree() the private data after calling the (*detach).

Foe aesthetic reasons, do the kfree()'ing of the buffers and urbs in
the reverse order that they were allocated.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 29d0c074
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment