Skip to content

Commit fa40ae3

Browse files
Gabriel Somlogregkh
authored andcommitted
kobject: move EXPORT_SYMBOL() macros next to corresponding definitions
Move EXPORT_SYMBOL() macros in kobject.c from the end of the file next to the function definitions to which they belong. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f702570 commit fa40ae3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/kobject.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ void kobject_del(struct kobject *kobj)
568568
kobject_put(kobj->parent);
569569
kobj->parent = NULL;
570570
}
571+
EXPORT_SYMBOL(kobject_del);
571572

572573
/**
573574
* kobject_get - increment refcount for object.
@@ -584,6 +585,7 @@ struct kobject *kobject_get(struct kobject *kobj)
584585
}
585586
return kobj;
586587
}
588+
EXPORT_SYMBOL(kobject_get);
587589

588590
static struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj)
589591
{
@@ -675,6 +677,7 @@ void kobject_put(struct kobject *kobj)
675677
kref_put(&kobj->kref, kobject_release);
676678
}
677679
}
680+
EXPORT_SYMBOL(kobject_put);
678681

679682
static void dynamic_kobj_release(struct kobject *kobj)
680683
{
@@ -803,6 +806,7 @@ int kset_register(struct kset *k)
803806
kobject_uevent(&k->kobj, KOBJ_ADD);
804807
return 0;
805808
}
809+
EXPORT_SYMBOL(kset_register);
806810

807811
/**
808812
* kset_unregister - remove a kset.
@@ -815,6 +819,7 @@ void kset_unregister(struct kset *k)
815819
kobject_del(&k->kobj);
816820
kobject_put(&k->kobj);
817821
}
822+
EXPORT_SYMBOL(kset_unregister);
818823

819824
/**
820825
* kset_find_obj - search for object in kset.
@@ -1051,10 +1056,3 @@ void kobj_ns_drop(enum kobj_ns_type type, void *ns)
10511056
kobj_ns_ops_tbl[type]->drop_ns(ns);
10521057
spin_unlock(&kobj_ns_type_lock);
10531058
}
1054-
1055-
EXPORT_SYMBOL(kobject_get);
1056-
EXPORT_SYMBOL(kobject_put);
1057-
EXPORT_SYMBOL(kobject_del);
1058-
1059-
EXPORT_SYMBOL(kset_register);
1060-
EXPORT_SYMBOL(kset_unregister);

0 commit comments

Comments
 (0)