From 60c4681ec8c8a05fd1fc4317697fde60b26860f7 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Thu, 9 Dec 2010 21:52:34 +0000 Subject: [PATCH] dahdi_echocan_hpec: Update the HPEC wrapper to use the new name interface I apparently forgot all about HPEC when updating the echocans for the change in the factory and echocan ops structures related to echocan naming. The HPEC wrapper should now be up to date with the rest of DAHDI. Signed-off-by: Kinsey Moore git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9526 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/hpec/dahdi_echocan_hpec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/dahdi/hpec/dahdi_echocan_hpec.c b/drivers/dahdi/hpec/dahdi_echocan_hpec.c index 2f6424e..fd7cc6f 100644 --- a/drivers/dahdi/hpec/dahdi_echocan_hpec.c +++ b/drivers/dahdi/hpec/dahdi_echocan_hpec.c @@ -42,9 +42,11 @@ static int echo_can_create(struct dahdi_chan *chan, struct dahdi_echocanparams * static void echo_can_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec); static void echo_can_process(struct dahdi_echocan_state *ec, short *isig, const short *iref, __u32 size); static int echo_can_traintap(struct dahdi_echocan_state *ec, int pos, short val); +static const char *name = "HPEC"; +static const char *ec_name(const struct dahdi_chan *chan) { return name; } static const struct dahdi_echocan_factory my_factory = { - .name = "HPEC", + .get_name = ec_name, .owner = THIS_MODULE, .echocan_create = echo_can_create, }; @@ -56,7 +58,6 @@ static const struct dahdi_echocan_features my_features = { }; static const struct dahdi_echocan_ops my_ops = { - .name = "HPEC", .echocan_free = echo_can_free, .echocan_process = echo_can_process, .echocan_traintap = echo_can_traintap, @@ -195,7 +196,8 @@ static int __init mod_init(void) return -EPERM; } - module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n", my_factory.name); + module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n", + my_factory.get_name(NULL)); hpec_init(logger, debug, DAHDI_CHUNKSIZE, memalloc, memfree);