Browse Source

Bugfix: bitmain: Use uint8_t consistently for binary data

Luke Dashjr 10 years ago
parent
commit
d87b3cf613
1 changed files with 3 additions and 3 deletions
  1. 3 3
      driver-bitmain.c

+ 3 - 3
driver-bitmain.c

@@ -165,7 +165,7 @@ void btm_detect(struct device_drv *drv, bool (*device_detect)(const char*))
 	device_detect("asic");
 	device_detect("asic");
 }
 }
 
 
-int btm_read(struct cgpu_info *cgpu, char *buf, size_t bufsize)
+int btm_read(struct cgpu_info * const cgpu, void * const buf, const size_t bufsize)
 {
 {
 	int err = 0;
 	int err = 0;
 	//applog(LOG_DEBUG, "btm_read ----- %d -----", bufsize);
 	//applog(LOG_DEBUG, "btm_read ----- %d -----", bufsize);
@@ -173,7 +173,7 @@ int btm_read(struct cgpu_info *cgpu, char *buf, size_t bufsize)
 	return err;
 	return err;
 }
 }
 
 
-int btm_write(struct cgpu_info *cgpu, char *buf, size_t bufsize)
+int btm_write(struct cgpu_info * const cgpu, void * const buf, const size_t bufsize)
 {
 {
 	int err = 0;
 	int err = 0;
 	//applog(LOG_DEBUG, "btm_write ----- %d -----", bufsize);
 	//applog(LOG_DEBUG, "btm_write ----- %d -----", bufsize);
@@ -1463,7 +1463,7 @@ static void *bitmain_get_results(void *userdata)
 	struct bitmain_info *info = bitmain->device_data;
 	struct bitmain_info *info = bitmain->device_data;
 	int offset = 0, ret = 0;
 	int offset = 0, ret = 0;
 	const int rsize = BITMAIN_FTDI_READSIZE;
 	const int rsize = BITMAIN_FTDI_READSIZE;
-	char readbuf[BITMAIN_READBUF_SIZE];
+	uint8_t readbuf[BITMAIN_READBUF_SIZE];
 	struct thr_info *thr = info->thr;
 	struct thr_info *thr = info->thr;
 	char threadname[24];
 	char threadname[24];
 	int errorcount = 0;
 	int errorcount = 0;