IB/uverbs: Make ib_uverbs_release_event_file() static
authorRoland Dreier <rolandd@cisco.com>
Wed, 10 Oct 2007 02:59:15 +0000 (19:59 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 10 Oct 2007 02:59:15 +0000 (19:59 -0700)
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>
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_main.c

index c33546f9e96199b28811ed5396c3daabda27e8c4..c75eb6c9bd49dee9a6d355e9d5fba9e211642247 100644 (file)
@@ -148,7 +148,6 @@ void idr_remove_uobj(struct idr *idp, struct ib_uobject *uobj);
 
 struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
                                        int is_async, int *fd);
-void ib_uverbs_release_event_file(struct kref *ref);
 struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd);
 
 void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
index 14d7ccd8919534d646814fb7cf58c89a81f07bc0..7c2ac39055822fa6e4db39a8fcd105ac35385e97 100644 (file)
@@ -125,6 +125,14 @@ static void ib_uverbs_release_dev(struct kref *ref)
        complete(&dev->comp);
 }
 
+static void ib_uverbs_release_event_file(struct kref *ref)
+{
+       struct ib_uverbs_event_file *file =
+               container_of(ref, struct ib_uverbs_event_file, ref);
+
+       kfree(file);
+}
+
 void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
                          struct ib_uverbs_event_file *ev_file,
                          struct ib_ucq_object *uobj)
@@ -331,14 +339,6 @@ static unsigned int ib_uverbs_event_poll(struct file *filp,
        return pollflags;
 }
 
-void ib_uverbs_release_event_file(struct kref *ref)
-{
-       struct ib_uverbs_event_file *file =
-               container_of(ref, struct ib_uverbs_event_file, ref);
-
-       kfree(file);
-}
-
 static int ib_uverbs_event_fasync(int fd, struct file *filp, int on)
 {
        struct ib_uverbs_event_file *file = filp->private_data;