Skip to content

Commit cf901a1

Browse files
committed
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" <[email protected]> Cc: Suzuki K Poulose <[email protected]> Cc: Saravana Kannan <[email protected]> Cc: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 94e14da commit cf901a1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

drivers/base/base.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,11 @@ extern void device_links_unbind_consumers(struct device *dev);
186186

187187
/* device pm support */
188188
void device_pm_move_to_tail(struct device *dev);
189+
190+
#ifdef CONFIG_DEVTMPFS
191+
int devtmpfs_create_node(struct device *dev);
192+
int devtmpfs_delete_node(struct device *dev);
193+
#else
194+
static inline int devtmpfs_create_node(struct device *dev) { return 0; }
195+
static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
196+
#endif

include/linux/device.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,12 +1664,8 @@ extern void put_device(struct device *dev);
16641664
extern bool kill_device(struct device *dev);
16651665

16661666
#ifdef CONFIG_DEVTMPFS
1667-
extern int devtmpfs_create_node(struct device *dev);
1668-
extern int devtmpfs_delete_node(struct device *dev);
16691667
extern int devtmpfs_mount(void);
16701668
#else
1671-
static inline int devtmpfs_create_node(struct device *dev) { return 0; }
1672-
static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
16731669
static inline int devtmpfs_mount(void) { return 0; }
16741670
#endif
16751671

0 commit comments

Comments
 (0)