summaryrefslogtreecommitdiff
path: root/hpec/hpec_zaptel.h
diff options
context:
space:
mode:
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)