staging: comedi: jr3_pci: tidy up jr3_download_firmware()

This callback function for comedi_load_firmware() first validates that
the firmware data is the correct format then it writes the data to each
subdevice.

Split the two operations out as separate functions to clarify the code.
Tidy up the new functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 files changed