diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2013-04-04 14:58:47 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 14:33:17 -0700 |
commit | 3346b798f202bf2f5b5272870ecdb75acec2e752 (patch) | |
tree | 62dc9510cdca136d526dd19d788a65e9d17edcf4 /drivers/staging/comedi/drivers.c | |
parent | 24fb134d1c336b263f75d7659f56a96382aebb56 (diff) |
staging: comedi: add comedi_release_hardware_device()
Add `comedi_release_hardware_device()` as a replacement for the call
sequence `comedi_find_board_minor()`, `comedi_free_board_minor()`. This
is slightly safer as we can make sure nothing funny happens to the found
`comedi_file_info_table[]` entry in the middle of the sequence. Change
`comedi_auto_unconfig()` to call the new function instead of the old
sequence. Remove `comedi_find_board_minor()` as it has no other
callers.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers.c')
-rw-r--r-- | drivers/staging/comedi/drivers.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 4460814d5344..29c8f5037065 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -459,14 +459,9 @@ EXPORT_SYMBOL_GPL(comedi_auto_config); void comedi_auto_unconfig(struct device *hardware_device) { - int minor; - if (hardware_device == NULL) return; - minor = comedi_find_board_minor(hardware_device); - if (minor < 0) - return; - comedi_free_board_minor(minor); + comedi_release_hardware_device(hardware_device); } EXPORT_SYMBOL_GPL(comedi_auto_unconfig); |