driver core: remove unnecessary function extern declare
authorShaokun Zhang <zhangshaokun@hisilicon.com>
Sun, 15 Jul 2018 10:08:56 +0000 (18:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2018 11:32:20 +0000 (13:32 +0200)
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>
drivers/base/base.h
drivers/base/core.c

index a75c3025fb7886abca1349a3774d419dcd76d5a0..7a419a7a6235b166625bcc4216de79a66249188c 100644 (file)
@@ -84,8 +84,6 @@ struct device_private {
 #define to_device_private_bus(obj)     \
        container_of(obj, struct device_private, knode_bus)
 
-extern int device_private_init(struct device *dev);
-
 /* initialisation functions */
 extern int devices_init(void);
 extern int buses_init(void);
index ceb8ce90aebb884ebaf470b86348b1cc8ce15ff1..9a6c71038616eb8e78154231edb8e1227e3e177f 100644 (file)
@@ -1736,7 +1736,7 @@ static void device_remove_sys_dev_entry(struct device *dev)
        }
 }
 
-int device_private_init(struct device *dev)
+static int device_private_init(struct device *dev)
 {
        dev->p = kzalloc(sizeof(*dev->p), GFP_KERNEL);
        if (!dev->p)