1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

Pass fd to avalon_idle.

This commit is contained in:
Con Kolivas 2013-05-25 14:05:52 +10:00
parent 664fd5b4a1
commit ee4d72e338

View File

@ -378,10 +378,10 @@ static void avalon_clear_readbuf(int fd)
} while (ret > 0);
}
static void avalon_idle(struct cgpu_info *avalon)
static void avalon_idle(struct cgpu_info *avalon, int fd)
{
struct avalon_info *info = avalon->device_data;
int i, fd = avalon->device_fd;
int i;
for (i = 0; i < info->miner_count; i++) {
struct avalon_task at;
@ -419,7 +419,7 @@ static int avalon_reset(struct cgpu_info *avalon, int fd)
p.tv_nsec = AVALON_RESET_PITCH;
nanosleep(&p, NULL);
avalon_clear_readbuf(fd);
avalon_idle(avalon);
avalon_idle(avalon, fd);
/* Reset again, then check result */
ret = avalon_write(fd, "ad", 2);
if (unlikely(ret == AVA_SEND_ERROR))