Browse Source

Use macro expansion to generate extern device_drv prototypes.

nfactor-troky
ckolivas 11 years ago
parent
commit
2903028e6b
  1. 5
      miner.h
  2. 24
      usbutils.c

5
miner.h

@ -248,6 +248,11 @@ enum drv_driver { @@ -248,6 +248,11 @@ enum drv_driver {
};
#undef DRIVER_ADD_COMMAND
/* Use DRIVER_PARSE_COMMANDS to generate extern device_drv prototypes */
#define DRIVER_ADD_COMMAND(X) extern struct device_drv X##_drv;
DRIVER_PARSE_COMMANDS;
#undef DRIVER_ADD_COMMAND
enum alive {
LIFE_WELL,
LIFE_SICK,

24
usbutils.c

@ -406,30 +406,6 @@ static struct usb_find_devices find_dev[] = { @@ -406,30 +406,6 @@ static struct usb_find_devices find_dev[] = {
{ DRV_LAST, NULL, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, NULL }
};
#ifdef USE_BFLSC
extern struct device_drv bflsc_drv;
#endif
#ifdef USE_BITFORCE
extern struct device_drv bitforce_drv;
#endif
#ifdef USE_BITFURY
extern struct device_drv bitfury_drv;
#endif
#ifdef USE_MODMINER
extern struct device_drv modminer_drv;
#endif
#ifdef USE_ICARUS
extern struct device_drv icarus_drv;
#endif
#ifdef USE_AVALON
extern struct device_drv avalon_drv;
#endif
#define STRBUFLEN 256
static const char *BLANK = "";
static const char *space = " ";

Loading…
Cancel
Save