Greg Kroah-Hartman | 619daee | 2018-01-22 16:18:13 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Tejun Heo | 6d66f5c | 2007-09-20 17:31:38 +0900 | [diff] [blame] | 2 | /* |
3 | * fs/sysfs/sysfs.h - sysfs internal header file | ||||
4 | * | ||||
5 | * Copyright (c) 2001-3 Patrick Mochel | ||||
6 | * Copyright (c) 2007 SUSE Linux Products GmbH | ||||
7 | * Copyright (c) 2007 Tejun Heo <teheo@suse.de> | ||||
Tejun Heo | 6d66f5c | 2007-09-20 17:31:38 +0900 | [diff] [blame] | 8 | */ |
9 | |||||
Tejun Heo | ae6621b | 2013-11-28 14:54:31 -0500 | [diff] [blame] | 10 | #ifndef __SYSFS_INTERNAL_H |
11 | #define __SYSFS_INTERNAL_H | ||||
David P. Quigley | ddd29ec | 2009-09-09 14:25:37 -0400 | [diff] [blame] | 12 | |
Tejun Heo | ae6621b | 2013-11-28 14:54:31 -0500 | [diff] [blame] | 13 | #include <linux/sysfs.h> |
Tejun Heo | fb6896d | 2007-06-14 04:27:24 +0900 | [diff] [blame] | 14 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 15 | /* |
16 | * mount.c | ||||
17 | */ | ||||
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 18 | extern struct kernfs_node *sysfs_root_kn; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 20 | /* |
21 | * dir.c | ||||
22 | */ | ||||
Tejun Heo | 0cae60f | 2013-10-30 10:28:36 -0400 | [diff] [blame] | 23 | extern spinlock_t sysfs_symlink_target_lock; |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 24 | |
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 25 | void sysfs_warn_dup(struct kernfs_node *parent, const char *name); |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 26 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 27 | /* |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 28 | * file.c |
29 | */ | ||||
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 30 | int sysfs_add_file(struct kernfs_node *parent, |
Tejun Heo | a7dc66d | 2013-11-28 14:54:23 -0500 | [diff] [blame] | 31 | const struct attribute *attr, bool is_bin); |
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 32 | int sysfs_add_file_mode_ns(struct kernfs_node *parent, |
Tejun Heo | a7dc66d | 2013-11-28 14:54:23 -0500 | [diff] [blame] | 33 | const struct attribute *attr, bool is_bin, |
Tejun Heo | 58292cbe | 2013-09-11 22:29:04 -0400 | [diff] [blame] | 34 | umode_t amode, const void *ns); |
Tejun Heo | 73d9714 | 2013-10-01 17:42:07 -0400 | [diff] [blame] | 35 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 36 | /* |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 37 | * symlink.c |
38 | */ | ||||
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 39 | int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target, |
Rafael J. Wysocki | 0bb8f3d | 2013-01-25 21:51:13 +0100 | [diff] [blame] | 40 | const char *name); |
Tejun Heo | ae6621b | 2013-11-28 14:54:31 -0500 | [diff] [blame] | 41 | |
42 | #endif /* __SYSFS_INTERNAL_H */ |