Commit 1601f6609d4b75b96bdd7aef18a38e9bc76a84a7

Con Kolivas 2014-01-05T08:53:09

Set all nanofury pin designations in one call

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/driver-bitfury.c b/driver-bitfury.c
index 2dbc3ad..ee45f97 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -490,10 +490,11 @@ static bool nf1_detect_one(struct cgpu_info *bitfury, struct bitfury_info *info)
 	int i, val;
 
 	/* Set all pins to GPIO mode */
-	for (i = 0; i < 9; i++) {
-		if (!mcp2210_set_gpio_pindes(bitfury, i, MCP2210_PIN_GPIO))
-			goto out;
-	}
+	for (i = 0; i < 9; i++)
+		info->mcp.designation.pin[i] = MCP2210_PIN_GPIO;
+	if (!mcp2210_set_gpio_pin_designations(bitfury, &info->mcp.designation))
+		goto out;
+
 	/* Set all pins to input mode */
 	for (i = 0; i < 9; i++) {
 		if (!mcp2210_set_gpio_input(bitfury, i))