1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef _LINUX_BINDER_INTERNAL_H
4 #define _LINUX_BINDER_INTERNAL_H
6 #include <linux/export.h>
8 #include <linux/list.h>
9 #include <linux/miscdevice.h>
10 #include <linux/mutex.h>
11 #include <linux/stddef.h>
12 #include <linux/types.h>
13 #include <linux/uidgid.h>
15 struct binder_context
{
16 struct binder_node
*binder_context_mgr_node
;
17 struct mutex context_mgr_node_lock
;
18 kuid_t binder_context_mgr_uid
;
23 * struct binder_device - information about a binder device node
24 * @hlist: list of binder devices (only used for devices requested via
25 * CONFIG_ANDROID_BINDER_DEVICES)
26 * @miscdev: information about a binder character device node
27 * @context: binder context information
28 * @binderfs_inode: This is the inode of the root dentry of the super block
29 * belonging to a binderfs mount.
31 struct binder_device
{
32 struct hlist_node hlist
;
33 struct miscdevice miscdev
;
34 struct binder_context context
;
35 struct inode
*binderfs_inode
;
38 extern const struct file_operations binder_fops
;
40 #ifdef CONFIG_ANDROID_BINDERFS
41 extern bool is_binderfs_device(const struct inode
*inode
);
43 static inline bool is_binderfs_device(const struct inode
*inode
)
49 #ifdef CONFIG_ANDROID_BINDERFS
50 extern int __init
init_binderfs(void);
52 static inline int __init
init_binderfs(void)
58 #endif /* _LINUX_BINDER_INTERNAL_H */