Browse Source

avalon: Since detection is not really implemented, only probe devices when the driver is specified to -S by name (eg, "avalon:/dev/ttyUSB0")

Luke Dashjr 12 years ago
parent
commit
db2a63c286
2 changed files with 3 additions and 1 deletions
  1. 1 1
      driver-avalon.c
  2. 2 0
      fpgautils.h

+ 1 - 1
driver-avalon.c

@@ -622,7 +622,7 @@ static bool avalon_detect_one(const char *devpath)
 
 static inline void avalon_detect()
 {
-	serial_detect(&avalon_drv, avalon_detect_one);
+	serial_detect_byname(&avalon_drv, avalon_detect_one);
 }
 
 static void __avalon_init(struct cgpu_info *avalon)

+ 2 - 0
fpgautils.h

@@ -21,6 +21,8 @@ extern int _serial_detect(struct device_drv *api, detectone_func_t, autoscan_fun
 	_serial_detect(api, detectone, autoscan, 2)
 #define serial_detect(api, detectone)  \
 	_serial_detect(api, detectone,     NULL, 0)
+#define serial_detect_byname(api, detectone)  \
+	_serial_detect(api, detectone,     NULL, 2)
 #define noserial_detect(api, autoscan)  \
 	_serial_detect(api, NULL     , autoscan, 0)
 extern int _serial_autodetect(detectone_func_t, ...);