summaryrefslogtreecommitdiff
path: root/hpec/hpec_zaptel.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-19 06:45:52 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-19 06:45:52 +0000
commit3277b9af1137aca9f05a324f957c1e32bcba7d1b (patch)
tree26ca1acbf8eea489e106e091d799339bc2ff15a7 /hpec/hpec_zaptel.h
parent4a8f1fb6fa4e4ad06f171c30d129dfeef6d07867 (diff)
eliminate a compiler warning and restore the ability to use HPEC (without parameters for now)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3526 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'hpec/hpec_zaptel.h')
-rw-r--r--hpec/hpec_zaptel.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/hpec/hpec_zaptel.h b/hpec/hpec_zaptel.h
index 80004da..2fb5a14 100644
--- a/hpec/hpec_zaptel.h
+++ b/hpec/hpec_zaptel.h
@@ -87,18 +87,22 @@ static inline void echo_can_array_update(struct echo_can_state *ec, short *iref,
DECLARE_MUTEX(alloc_lock);
-static inline struct echo_can_state *echo_can_create(int len, int adaption_mode)
+static int echo_can_create(struct zt_echocanparams *ecp, struct zt_echocanparam *p,
+ struct echo_can_state **ec)
{
- struct echo_can_state *result = NULL;
+ if (ecp->param_count > 0) {
+ printk(KERN_WARNING "HPEC does not support parameters; failing request\n");
+ return -EINVAL;
+ }
if (down_interruptible(&alloc_lock))
- return NULL;
+ return -ENOTTY;
- result = hpec_channel_alloc(len);
+ *ec = hpec_channel_alloc(ecp->tap_length);
up(&alloc_lock);
- return result;
+ return *ec ? 0 : -ENOTTY;
}
static inline int echo_can_traintap(struct echo_can_state *ec, int pos, short val)