From: Greg Kroah-Hartman Date: Mon, 9 Dec 2019 19:32:59 +0000 (+0100) Subject: device.h: move devtmpfs prototypes out of the file X-Git-Tag: v5.15~4623^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf901a1c5dd8df18d2308188d094a01e1e7c2143;p=platform%2Fkernel%2Flinux-starfive.git device.h: move devtmpfs prototypes out of the file The devtmpfs functions do not need to be in device.h as only the driver core uses them, so move them to the private .h file for the driver core. Cc: "Rafael J. Wysocki" Cc: Suzuki K Poulose Cc: Saravana Kannan Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20191209193303.1694546-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/base.h b/drivers/base/base.h index 80598b3..40fb069 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -186,3 +186,11 @@ extern void device_links_unbind_consumers(struct device *dev); /* device pm support */ void device_pm_move_to_tail(struct device *dev); + +#ifdef CONFIG_DEVTMPFS +int devtmpfs_create_node(struct device *dev); +int devtmpfs_delete_node(struct device *dev); +#else +static inline int devtmpfs_create_node(struct device *dev) { return 0; } +static inline int devtmpfs_delete_node(struct device *dev) { return 0; } +#endif diff --git a/include/linux/device.h b/include/linux/device.h index 96ff767..ba4c24f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1664,12 +1664,8 @@ extern void put_device(struct device *dev); extern bool kill_device(struct device *dev); #ifdef CONFIG_DEVTMPFS -extern int devtmpfs_create_node(struct device *dev); -extern int devtmpfs_delete_node(struct device *dev); extern int devtmpfs_mount(void); #else -static inline int devtmpfs_create_node(struct device *dev) { return 0; } -static inline int devtmpfs_delete_node(struct device *dev) { return 0; } static inline int devtmpfs_mount(void) { return 0; } #endif