[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1531649336-20135-1-git-send-email-zhangshaokun@hisilicon.com>
Date: Sun, 15 Jul 2018 18:08:56 +0800
From: Shaokun Zhang <zhangshaokun@...ilicon.com>
To: <linux-kernel@...r.kernel.org>
CC: Shaokun Zhang <zhangshaokun@...ilicon.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: [PATCH] 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@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>
Signed-off-by: Shaokun Zhang <zhangshaokun@...ilicon.com>
---
drivers/base/base.h | 2 --
drivers/base/core.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/base/base.h b/drivers/base/base.h
index a75c302..7a419a7 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -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);
diff --git a/drivers/base/core.c b/drivers/base/core.c
index df3e1a4..2ba30ce 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -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)
--
2.7.4
Powered by blists - more mailing lists