From: Bernd Porr Date: Wed, 13 Apr 2005 19:34:23 +0000 (+0000) Subject: Fixed a bug which uploaded the firmware always to the first X-Git-Tag: r0_7_71~148 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=34a44319dc2e7aa907240d6989717cc4a2e07863;p=comedi.git Fixed a bug which uploaded the firmware always to the first device. Even if there were two devices. Thus, the second device never got the firmware uploaded. Thanks to Bjorn Kinell. --- diff --git a/comedi/drivers/usbdux.c b/comedi/drivers/usbdux.c index 1a754008..7be9a81e 100644 --- a/comedi/drivers/usbdux.c +++ b/comedi/drivers/usbdux.c @@ -1,4 +1,4 @@ -#define DRIVER_VERSION "v1.00pre10" +#define DRIVER_VERSION "v1.00pre11" #define DRIVER_AUTHOR "Bernd Porr, BerndPorr@f2s.com" #define DRIVER_DESC "Stirling/ITL USB-DUX -- Bernd.Porr@f2s.com" /* @@ -25,7 +25,7 @@ Driver: usbdux.c Description: University of Stirling USB DAQ & INCITE Technology Limited Devices: [ITL] USB-DUX (usbdux.o) Author: Bernd Porr -Updated: 04 Jan 2005 +Updated: 13 Apr 2005 Status: Stable Configuration options: You have to upload firmware with the -i option. The @@ -2541,9 +2541,9 @@ static int usbdux_attach(comedi_device * dev, comedi_devconfig * it) // trying to upload the firmware into the chip if(comedi_aux_data(it->options, 0) && - it->options[COMEDI_DEVCONF_AUX_DATA_LENGTH]){ - read_firmware(usbduxsub, - comedi_aux_data(it->options, 0), + it->options[COMEDI_DEVCONF_AUX_DATA_LENGTH]){ + read_firmware(usbduxsub+index, + comedi_aux_data(it->options, 0), it->options[COMEDI_DEVCONF_AUX_DATA_LENGTH]); }