From c659b9f900fc91cbb3269ab907f15b52c26b252f Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 2 Jun 2011 20:01:15 +0000 Subject: dahdi: Make tone zone registration messages debug only. This duplicates information that is already in the /etc/dahdi/system.conf file and should normally only be necessary for the user when debugging problems. Signed-off-by: Shaun Ruffell Acked-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9936 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'drivers/dahdi/dahdi-base.c') diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index fac7d28..a9cd775 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -1475,9 +1475,17 @@ static int dahdi_ioctl_freezone(unsigned long data) } if (found) { list_del(&found->node); - tone_zone_put(found); } spin_unlock(&zone_lock); + + if (found) { + if (debug) { + module_printk(KERN_INFO, + "Unregistering tone zone %d (%s)\n", + found->num, found->name); + } + tone_zone_put(found); + } return 0; } @@ -1496,8 +1504,11 @@ static int dahdi_register_tone_zone(struct dahdi_zone *zone) } if (!res) { list_add_tail(&zone->node, &tone_zones); - module_printk(KERN_INFO, "Registered tone zone %d (%s)\n", - zone->num, zone->name); + if (debug) { + module_printk(KERN_INFO, + "Registered tone zone %d (%s)\n", + zone->num, zone->name); + } } spin_unlock(&zone_lock); -- cgit v1.2.3