aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:15 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:15 -0400
commit04d29b0ede242000b24cfc34cc78fbd164c47e1a (patch)
treed507a61d43b04326523a3425afcc2e76d68012a9 /drivers/infiniband
parenta394f83bdfec10b09d8cb111e622556b2e6fd0de (diff)
IB/uverbs: Make ib_uverbs_release_event_file() static
ib_uverbs_release_event_file() is only used in uverbs_main.c, so make it static to that file. Also move the definition before the first use, so a forward declaration is not needed. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/uverbs.h1
-rw-r--r--drivers/infiniband/core/uverbs_main.c16
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h
index c33546f9e961..c75eb6c9bd49 100644
--- a/drivers/infiniband/core/uverbs.h
+++ b/drivers/infiniband/core/uverbs.h
@@ -148,7 +148,6 @@ void idr_remove_uobj(struct idr *idp, struct ib_uobject *uobj);
148 148
149struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file, 149struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
150 int is_async, int *fd); 150 int is_async, int *fd);
151void ib_uverbs_release_event_file(struct kref *ref);
152struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd); 151struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd);
153 152
154void ib_uverbs_release_ucq(struct ib_uverbs_file *file, 153void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 14d7ccd89195..7c2ac3905582 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -125,6 +125,14 @@ static void ib_uverbs_release_dev(struct kref *ref)
125 complete(&dev->comp); 125 complete(&dev->comp);
126} 126}
127 127
128static void ib_uverbs_release_event_file(struct kref *ref)
129{
130 struct ib_uverbs_event_file *file =
131 container_of(ref, struct ib_uverbs_event_file, ref);
132
133 kfree(file);
134}
135
128void ib_uverbs_release_ucq(struct ib_uverbs_file *file, 136void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
129 struct ib_uverbs_event_file *ev_file, 137 struct ib_uverbs_event_file *ev_file,
130 struct ib_ucq_object *uobj) 138 struct ib_ucq_object *uobj)
@@ -331,14 +339,6 @@ static unsigned int ib_uverbs_event_poll(struct file *filp,
331 return pollflags; 339 return pollflags;
332} 340}
333 341
334void ib_uverbs_release_event_file(struct kref *ref)
335{
336 struct ib_uverbs_event_file *file =
337 container_of(ref, struct ib_uverbs_event_file, ref);
338
339 kfree(file);
340}
341
342static int ib_uverbs_event_fasync(int fd, struct file *filp, int on) 342static int ib_uverbs_event_fasync(int fd, struct file *filp, int on)
343{ 343{
344 struct ib_uverbs_event_file *file = filp->private_data; 344 struct ib_uverbs_event_file *file = filp->private_data;