Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97995155
D34771.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34771.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/cdev.h b/sys/compat/linuxkpi/common/include/linux/cdev.h
--- a/sys/compat/linuxkpi/common/include/linux/cdev.h
+++ b/sys/compat/linuxkpi/common/include/linux/cdev.h
@@ -57,6 +57,8 @@
u_int siref;
};
+struct linux_cdev *cdev_alloc(void);
+
static inline void
cdev_init(struct linux_cdev *cdev, const struct file_operations *ops)
{
@@ -66,17 +68,6 @@
cdev->refs = 1;
}
-static inline struct linux_cdev *
-cdev_alloc(void)
-{
- struct linux_cdev *cdev;
-
- cdev = kzalloc(sizeof(struct linux_cdev), M_WAITOK);
- kobject_init(&cdev->kobj, &linux_cdev_ktype);
- cdev->refs = 1;
- return (cdev);
-}
-
static inline void
cdev_put(struct linux_cdev *p)
{
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -602,6 +602,17 @@
}
}
+struct linux_cdev *
+cdev_alloc(void)
+{
+ struct linux_cdev *cdev;
+
+ cdev = kzalloc(sizeof(struct linux_cdev), M_WAITOK);
+ kobject_init(&cdev->kobj, &linux_cdev_ktype);
+ cdev->refs = 1;
+ return (cdev);
+}
+
static int
linux_cdev_pager_fault(vm_object_t vm_obj, vm_ooffset_t offset, int prot,
vm_page_t *mres)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 2, 11:23 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13404500
Default Alt Text
D34771.diff (1 KB)
Attached To
Mode
D34771: linuxkpi: Move cdev_alloc into .c file
Attached
Detach File
Event Timeline
Log In to Comment