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 <dbailey@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com>
This commit is contained in:
@@ -2059,7 +2059,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user