diff --git a/drivers/base/base.h b/drivers/base/base.h index 80598b312940..40fb069a8a7e 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 96ff76731e93..ba4c24f9cd8b 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