summaryrefslogtreecommitdiff
path: root/drivers/dahdi/dahdi_dynamic_loc.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-10-28 21:49:02 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-10-28 21:49:02 +0000
commit1b3b35987cc3e8c555f148306234e5f732761bd5 (patch)
tree8acd0b016433ced01fd64876a031381c822c30aa /drivers/dahdi/dahdi_dynamic_loc.c
parent45a52ab6fce416fe92a80108e815556b0a2335ea (diff)
fix a large number of warnings found by sparse, the kernel code sanity checking tool. some of these fixes are non-optimal (casting 'unsigned long' to '__user void *'), but are unavoidable in many cases. started from tzafrir's patch, did most of the work myself.
(closes issue #13763) Reported by: tzafrir Patches: sparse_fixes_1.diff uploaded by tzafrir (license 46) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5162 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi_dynamic_loc.c')
-rw-r--r--drivers/dahdi/dahdi_dynamic_loc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/dahdi/dahdi_dynamic_loc.c b/drivers/dahdi/dahdi_dynamic_loc.c
index 36b9c9e..010fe85 100644
--- a/drivers/dahdi/dahdi_dynamic_loc.c
+++ b/drivers/dahdi/dahdi_dynamic_loc.c
@@ -72,7 +72,7 @@ static struct ztdlocal {
struct ztdlocal *next;
} *zdevs = NULL;
-/*static*/ int ztdlocal_transmit(void *pvt, unsigned char *msg, int msglen)
+static int ztdlocal_transmit(void *pvt, unsigned char *msg, int msglen)
{
struct ztdlocal *z;
unsigned long flags;
@@ -121,7 +121,7 @@ static int digit2int(char d)
return -1;
}
-/*static*/ void ztdlocal_destroy(void *pvt)
+static void ztdlocal_destroy(void *pvt)
{
struct ztdlocal *z = pvt;
unsigned long flags;
@@ -156,7 +156,7 @@ static int digit2int(char d)
}
}
-/*static*/ void *ztdlocal_create(struct dahdi_span *span, char *address)
+static void *ztdlocal_create(struct dahdi_span *span, char *address)
{
struct ztdlocal *z, *l;
unsigned long flags;
@@ -231,6 +231,7 @@ CLEAR_AND_DEL_FROM_PEERS:
l->monitor_rx_peer = NULL;
}
kfree (z);
+ spin_unlock_irqrestore(&zlock, flags);
return NULL;
INVALID_ADDRESS:
@@ -247,13 +248,13 @@ static struct dahdi_dynamic_driver ztd_local = {
NULL /* flush */
};
-/*static*/ int __init ztdlocal_init(void)
+static int __init ztdlocal_init(void)
{
dahdi_dynamic_register(&ztd_local);
return 0;
}
-/*static*/ void __exit ztdlocal_exit(void)
+static void __exit ztdlocal_exit(void)
{
dahdi_dynamic_unregister(&ztd_local);
}