From feac553f9f107e630f79d2170178dd6715d1d3d2 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Wed, 20 Oct 2010 12:23:16 +0000 Subject: dahdi: Atomically set/test if channel has associated network device. Push all tests for the DAHDI_FLAGBIT_NETDEV flag behind a 'dahdi_have_netdev' function so if CONFIG_DAHDI_NET is not defined the compiler can just remove all the flag tests. Also, makes sure that the bit is checked / set atomically. (closes issue #9379) Signed-off-by: Shaun Ruffell Acked-by: Kinsey Moore Acked-by: Russ Meyerriecks git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9444 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wct1xxp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/dahdi/wct1xxp.c') diff --git a/drivers/dahdi/wct1xxp.c b/drivers/dahdi/wct1xxp.c index 76b038f..e5ed794 100644 --- a/drivers/dahdi/wct1xxp.c +++ b/drivers/dahdi/wct1xxp.c @@ -1072,7 +1072,7 @@ static void t1xxp_check_alarms(struct t1xxp *wc) if (wc->span.lineconfig & DAHDI_CONFIG_NOTOPEN) { for (x=0,j=0;x < wc->span.channels;x++) if ((wc->chans[x]->flags & DAHDI_FLAG_OPEN) || - (wc->chans[x]->flags & DAHDI_FLAG_NETDEV)) + dahdi_have_netdev(wc->chans[x])) j++; if (!j) alarms |= DAHDI_ALARM_NOTOPEN; -- cgit v1.2.3