Comprare ftdi->type and do not set it in EEPROM Structure initialization
authorUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Fri, 10 Sep 2010 09:20:08 +0000 (11:20 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 20 Sep 2010 13:34:40 +0000 (15:34 +0200)
src/ftdi.c

index 9ddac9d..33ed148 100644 (file)
@@ -2190,7 +2190,8 @@ void ftdi_eeprom_initdefaults(struct ftdi_context *ftdi)
 
     eeprom->vendor_id = 0x0403;
     eeprom->use_serial = USE_SERIAL_NUM;
-    if((ftdi->type= TYPE_AM) || (ftdi->type= TYPE_BM) ||(ftdi->type= TYPE_R))
+    if((ftdi->type == TYPE_AM) || (ftdi->type == TYPE_BM) ||
+       (ftdi->type == TYPE_R))
         eeprom->product_id = 0x6001;
     else
         eeprom->product_id = 0x6010;