Browse Source

Forward declare all device drivers in miner.h avoiding the need to export them everywhere else.

nfactor-troky
ckolivas 11 years ago
parent
commit
741b74309e
  1. 1
      driver-avalon.c
  2. 2
      driver-bflsc.c
  3. 2
      driver-bitforce.c
  4. 1
      driver-bitfury.c
  5. 2
      driver-icarus.c
  6. 2
      driver-modminer.c
  7. 4
      driver-opencl.c
  8. 2
      driver-ztex.c
  9. 2
      miner.h

1
driver-avalon.c

@ -52,7 +52,6 @@ int opt_bitburner_core_voltage = BITBURNER_DEFAULT_CORE_VOLTAGE;
bool opt_avalon_auto; bool opt_avalon_auto;
static int option_offset = -1; static int option_offset = -1;
struct device_drv avalon_drv;
static int avalon_init_task(struct avalon_task *at, static int avalon_init_task(struct avalon_task *at,
uint8_t reset, uint8_t ff, uint8_t fan, uint8_t reset, uint8_t ff, uint8_t fan,

2
driver-bflsc.c

@ -33,8 +33,6 @@ int opt_bflsc_overheat = BFLSC_TEMP_OVERHEAT;
static const char *blank = ""; static const char *blank = "";
struct device_drv bflsc_drv;
static enum driver_version drv_ver(struct cgpu_info *bflsc, const char *ver) static enum driver_version drv_ver(struct cgpu_info *bflsc, const char *ver)
{ {
char *tmp; char *tmp;

2
driver-bitforce.c

@ -77,8 +77,6 @@
static const char *blank = ""; static const char *blank = "";
struct device_drv bitforce_drv;
static void bitforce_initialise(struct cgpu_info *bitforce, bool lock) static void bitforce_initialise(struct cgpu_info *bitforce, bool lock)
{ {
int err, interface; int err, interface;

1
driver-bitfury.c

@ -15,7 +15,6 @@
/* Wait longer 1/3 longer than it would take for a full nonce range */ /* Wait longer 1/3 longer than it would take for a full nonce range */
#define BF1WAIT 1600 #define BF1WAIT 1600
struct device_drv bitfury_drv;
static void bitfury_empty_buffer(struct cgpu_info *bitfury) static void bitfury_empty_buffer(struct cgpu_info *bitfury)
{ {

2
driver-icarus.c

@ -235,8 +235,6 @@ struct ICARUS_INFO {
// //
static int option_offset = -1; static int option_offset = -1;
struct device_drv icarus_drv;
/* /*
#define ICA_BUFSIZ (0x200) #define ICA_BUFSIZ (0x200)

2
driver-modminer.c

@ -87,8 +87,6 @@
// Limit when reducing shares_to_good // Limit when reducing shares_to_good
#define MODMINER_MIN_BACK 12 #define MODMINER_MIN_BACK 12
struct device_drv modminer_drv;
// 45 noops sent when detecting, in case the device was left in "start job" reading // 45 noops sent when detecting, in case the device was left in "start job" reading
static const char NOOP[] = MODMINER_PING "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"; static const char NOOP[] = MODMINER_PING "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";

4
driver-opencl.c

@ -56,10 +56,6 @@ extern void decay_time(double *f, double fadd);
/**********************************************/ /**********************************************/
#ifdef HAVE_OPENCL
struct device_drv opencl_drv;
#endif
#ifdef HAVE_ADL #ifdef HAVE_ADL
extern float gpu_temp(int gpu); extern float gpu_temp(int gpu);
extern int gpu_fanspeed(int gpu); extern int gpu_fanspeed(int gpu);

2
driver-ztex.c

@ -31,8 +31,6 @@
#define GOLDEN_BACKLOG 5 #define GOLDEN_BACKLOG 5
struct device_drv ztex_drv;
// Forward declarations // Forward declarations
static void ztex_disable(struct thr_info* thr); static void ztex_disable(struct thr_info* thr);
static bool ztex_prepare(struct thr_info *thr); static bool ztex_prepare(struct thr_info *thr);

2
miner.h

@ -249,7 +249,7 @@ enum drv_driver {
#undef DRIVER_ADD_COMMAND #undef DRIVER_ADD_COMMAND
/* Use DRIVER_PARSE_COMMANDS to generate extern device_drv prototypes */ /* Use DRIVER_PARSE_COMMANDS to generate extern device_drv prototypes */
#define DRIVER_ADD_COMMAND(X) extern struct device_drv X##_drv; #define DRIVER_ADD_COMMAND(X) struct device_drv X##_drv;
DRIVER_PARSE_COMMANDS; DRIVER_PARSE_COMMANDS;
#undef DRIVER_ADD_COMMAND #undef DRIVER_ADD_COMMAND

Loading…
Cancel
Save