diff options
| author | Shaokun Zhang <zhangshaokun@hisilicon.com> | 2018-07-15 06:08:56 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 07:32:20 -0400 |
| commit | 46d3a03781ea70e25360660ac53bbb838de11c97 (patch) | |
| tree | 88fd0e1204a97c05b57e8bd2ead787546eeb9da8 | |
| parent | 3ec78790ec9a1e23fd9b6c8681a7cd3b64d3ad23 (diff) | |
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>
| -rw-r--r-- | drivers/base/base.h | 2 | ||||
| -rw-r--r-- | drivers/base/core.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h index a75c3025fb78..7a419a7a6235 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h | |||
| @@ -84,8 +84,6 @@ struct device_private { | |||
| 84 | #define to_device_private_bus(obj) \ | 84 | #define to_device_private_bus(obj) \ |
| 85 | container_of(obj, struct device_private, knode_bus) | 85 | container_of(obj, struct device_private, knode_bus) |
| 86 | 86 | ||
| 87 | extern int device_private_init(struct device *dev); | ||
| 88 | |||
| 89 | /* initialisation functions */ | 87 | /* initialisation functions */ |
| 90 | extern int devices_init(void); | 88 | extern int devices_init(void); |
| 91 | extern int buses_init(void); | 89 | extern int buses_init(void); |
diff --git a/drivers/base/core.c b/drivers/base/core.c index ceb8ce90aebb..9a6c71038616 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) | |||
| 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 | dev->p = kzalloc(sizeof(*dev->p), GFP_KERNEL); | 1741 | dev->p = kzalloc(sizeof(*dev->p), GFP_KERNEL); |
| 1742 | if (!dev->p) | 1742 | if (!dev->p) |
