diff options
Diffstat (limited to 'drivers/staging/comedi/drivers/me_daq.c')
-rw-r--r-- | drivers/staging/comedi/drivers/me_daq.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c index 09f2a9feaf7c..7533ece3670e 100644 --- a/drivers/staging/comedi/drivers/me_daq.c +++ b/drivers/staging/comedi/drivers/me_daq.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* @@ -37,7 +33,6 @@ #include <linux/pci.h> #include <linux/interrupt.h> #include <linux/sched.h> -#include <linux/firmware.h> #include "../comedidev.h" @@ -391,7 +386,8 @@ static int me_ao_insn_read(struct comedi_device *dev, } static int me2600_xilinx_download(struct comedi_device *dev, - const u8 *data, size_t size) + const u8 *data, size_t size, + unsigned long context) { struct me_private_data *dev_private = dev->private; unsigned int value; @@ -460,22 +456,6 @@ static int me2600_xilinx_download(struct comedi_device *dev, return 0; } -static int me2600_upload_firmware(struct comedi_device *dev) -{ - struct pci_dev *pcidev = comedi_to_pci_dev(dev); - const struct firmware *fw; - int ret; - - ret = request_firmware(&fw, ME2600_FIRMWARE, &pcidev->dev); - if (ret) - return ret; - - ret = me2600_xilinx_download(dev, fw->data, fw->size); - release_firmware(fw); - - return ret; -} - static int me_reset(struct comedi_device *dev) { struct me_private_data *dev_private = dev->private; @@ -529,7 +509,9 @@ static int me_auto_attach(struct comedi_device *dev, /* Download firmware and reset card */ if (board->needs_firmware) { - ret = me2600_upload_firmware(dev); + ret = comedi_load_firmware(dev, &comedi_to_pci_dev(dev)->dev, + ME2600_FIRMWARE, + me2600_xilinx_download, 0); if (ret < 0) return ret; } |