Browse Source

DevAPI: Remove long deprecated serial_detect function family

Luke Dashjr 11 years ago
parent
commit
a0a75c9beb
2 changed files with 2 additions and 28 deletions
  1. 2 15
      deviceapi.c
  2. 0 13
      deviceapi.h

+ 2 - 15
deviceapi.c

@@ -966,6 +966,7 @@ bool _serial_detect_all(struct lowlevel_device_info * const info, void * const u
 }
 #endif
 
+// NOTE: This is never used for any actual VCOM devices, which should use the new lowlevel interface
 int _serial_detect(struct device_drv *api, detectone_func_t detectone, autoscan_func_t autoscan, int flags)
 {
 	struct string_elist *iter, *tmp;
@@ -974,7 +975,6 @@ int _serial_detect(struct device_drv *api, detectone_func_t detectone, autoscan_
 	char found = 0;
 	bool forceauto = flags & 1;
 	bool hasname;
-	bool doall = false;
 	size_t namel = strlen(api->name);
 	size_t dnamel = strlen(api->dname);
 
@@ -1008,25 +1008,12 @@ int _serial_detect(struct device_drv *api, detectone_func_t detectone, autoscan_
 		{}  // do nothing
 		else
 		if (!strcmp(dev, "all"))
-			doall = true;
-#ifdef NEED_BFG_LOWL_VCOM
-		else
-		if (serial_claim(dev, NULL))
-		{
-			applog(LOG_DEBUG, "%s is already claimed... skipping probes", dev);
-			string_elist_del(&scan_devices, iter);
-		}
-#endif
+		{}  // n/a
 		else if (detectone(dev)) {
 			string_elist_del(&scan_devices, iter);
 			++found;
 		}
 	}
-
-#ifdef NEED_BFG_LOWL_VCOM
-	if (doall && detectone)
-		found += lowlevel_detect_id(_serial_detect_all, detectone, &lowl_vcom, 0, 0);
-#endif
 	
 	if ((forceauto || !(inhibitauto || found)) && autoscan)
 		found += autoscan();

+ 0 - 13
deviceapi.h

@@ -97,24 +97,11 @@ typedef bool(*detectone_func_t)(const char*);
 typedef int(*autoscan_func_t)();
 
 enum generic_detect_flags {
-	GDF_FORCE_AUTO = 1,
 	GDF_REQUIRE_DNAME = 2,
 	GDF_DEFAULT_NOAUTO = 4,
 };
 
 extern int _serial_detect(struct device_drv *api, detectone_func_t, autoscan_func_t, int flags);
-#define serial_detect_fauto(api, detectone, autoscan)  \
-	_serial_detect(api, detectone, autoscan, 1)
-#define serial_detect_auto(api, detectone, autoscan)  \
-	_serial_detect(api, detectone, autoscan, 0)
-#define serial_detect_auto_byname(api, detectone, autoscan)  \
-	_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)
 #define noserial_detect_manual(api, autoscan)  \
 	_serial_detect(api, NULL     , autoscan, 4)
 #define generic_detect(drv, detectone, autoscan, flags)  _serial_detect(drv, detectone, autoscan, flags)