Skip to content
Commit a200fadc authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: use refcount in comedi_driver_unregister()



Change `comedi_driver_unregister()` to call
`comedi_dev_get_from_minor()` instead of `comedi_dev_from_minor()` when
finding devices using the driver.  This increments the reference count
to prevent the device being removed while it is being checked to see if
it is attached to the driver.  Call `comedi_dev_put()` to decrement the
reference afterwards.

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fc406986
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment