Skip to content

Commit

Permalink
driver core: remove unnecessary function extern declare
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shaokun Zhang authored and Greg Kroah-Hartman committed Jul 16, 2018
1 parent 3ec7879 commit 46d3a03
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions drivers/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 46d3a03

Please sign in to comment.