summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/wctdm24xxp.h')
-rw-r--r--drivers/dahdi/wctdm24xxp/wctdm24xxp.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
index 0f497aa..4ab313d 100644
--- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
+++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
@@ -273,11 +273,17 @@ struct wctdm {
struct semaphore syncsem;
int oldsync;
- int initialized; /* 0 when the entire card is ready to go */
+ int not_ready; /* 0 when the entire card is ready to go */
unsigned long checkflag; /* Internal state flags and task bits */
int companding;
};
+static inline bool is_initialized(struct wctdm *wc)
+{
+ WARN_ON(wc->not_ready < 0);
+ return (wc->not_ready == 0);
+}
+
/* Atomic flag bits for checkflag field */
#define WCTDM_CHECK_TIMING 0