summaryrefslogtreecommitdiff
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-08-31 12:30:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-14 12:28:32 +0300
commit8988bacd6045adf39719e5057e43170f83bd1709 (patch)
treebd9e6cead1f4658c75c943f96edf21f67701cc37 /include/linux/kobject.h
parent6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f (diff)
downloadlinux-8988bacd6045adf39719e5057e43170f83bd1709.tar.xz
kobject: unexport kobject_create() in kobject.h
The function kobject_create() is only used by one caller, kobject_create_and_add(), no other driver uses it, nor is exported to other modules. However it's still exported in kobject.h, and can sometimes confuse users of kobject.h. Since all users should call kobject_create_and_add(), or if extra attributes are needed, should alloc the memory manually then call kobject_init_and_add(). Signed-off-by: Qu Wenruo <wqu@suse.com> Link: https://lore.kernel.org/r/20210831093044.110729-1-wqu@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index ea30529fba08..efd56f990a46 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -101,7 +101,6 @@ int kobject_init_and_add(struct kobject *kobj,
extern void kobject_del(struct kobject *kobj);
-extern struct kobject * __must_check kobject_create(void);
extern struct kobject * __must_check kobject_create_and_add(const char *name,
struct kobject *parent);