From 664fd5b4a183824f2d46a71f070774c09f5bdb8d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 25 May 2013 14:03:45 +1000 Subject: [PATCH] Revert "Change to setting avalon_task to being the pointer for avalon_idle." This reverts commit 91a82cd81f8ef63621cc473601adb325d662e409. --- driver-avalon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/driver-avalon.c b/driver-avalon.c index c694c0a9..f0c57749 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -384,18 +384,17 @@ static void avalon_idle(struct cgpu_info *avalon) int i, fd = avalon->device_fd; for (i = 0; i < info->miner_count; i++) { - char buf[AVALON_WRITE_SIZE]; - struct avalon_task *at = (struct avalon_task *)buf; + struct avalon_task at; int ret; if (unlikely(avalon_buffer_full(fd))) { applog(LOG_WARNING, "Avalon buffer full in avalon_idle"); break; } - avalon_init_task(at, 0, 0, info->fan_pwm, + avalon_init_task(&at, 0, 0, info->fan_pwm, info->timeout, info->asic_count, info->miner_count, 1, 1, info->frequency); - ret = avalon_write(fd, buf, AVALON_WRITE_SIZE); + ret = avalon_write(fd, (char *)&at, AVALON_WRITE_SIZE); if (unlikely(ret == AVA_SEND_ERROR)) break; }