summaryrefslogtreecommitdiff
path: root/drivers/dahdi/dahdi-base.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-06-02 20:01:15 +0000
committerShaun Ruffell <sruffell@digium.com>2011-06-02 20:01:15 +0000
commitc659b9f900fc91cbb3269ab907f15b52c26b252f (patch)
tree21416b046d957218abee17db58415ef011f67654 /drivers/dahdi/dahdi-base.c
parent07f5c4e9bfbd4a22c6473f19e9fd75b45abf5fe7 (diff)
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 <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9936 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi-base.c')
-rw-r--r--drivers/dahdi/dahdi-base.c17
1 files changed, 14 insertions, 3 deletions
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);