From 46cfdca5d54ee1154045553c420cb64b45debe0f Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 17 Dec 2012 13:00:18 -0600 Subject: [PATCH] wct4xxp: t4_serial_setup() was called more often than necessary. The driver iterates through all the spans on a given device during assignment, checking for unassigned spans, but it was erroneously testing the span on which assigned was called. This just removes some unexpected behavior and provides a slight performance increase on load and does not impact the functionality of the driver as far as I'm aware. Reported-by: Doug Bailey Signed-off-by: Shaun Ruffell (cherry picked from commit 9de213b1044c5e005d714b9cf00a367120d42392) --- drivers/dahdi/wct4xxp/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index a17fab5..da86eca 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -2039,7 +2039,7 @@ static void t4_span_assigned(struct dahdi_span *span) /* We use this to make sure all the spans are assigned before * running the serial setup. */ list_for_each_entry(pos, &wc->ddev->spans, device_node) { - if (!test_bit(DAHDI_FLAGBIT_REGISTERED, &span->flags)) + if (!test_bit(DAHDI_FLAGBIT_REGISTERED, &pos->flags)) ++unassigned_spans; }