Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: remove unnecessary function extern declare

device_private_init is called only in core.c, extern declare is
unnecessary and make it static.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Shaokun Zhang and committed by
Greg Kroah-Hartman
46d3a037 3ec78790

+1 -3
-2
drivers/base/base.h
··· 84 84 #define to_device_private_bus(obj) \ 85 85 container_of(obj, struct device_private, knode_bus) 86 86 87 - extern int device_private_init(struct device *dev); 88 - 89 87 /* initialisation functions */ 90 88 extern int devices_init(void); 91 89 extern int buses_init(void);
+1 -1
drivers/base/core.c
··· 1736 1736 } 1737 1737 } 1738 1738 1739 - int device_private_init(struct device *dev) 1739 + static int device_private_init(struct device *dev) 1740 1740 { 1741 1741 dev->p = kzalloc(sizeof(*dev->p), GFP_KERNEL); 1742 1742 if (!dev->p)