Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102998459
D34769.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
D34769.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -289,6 +289,8 @@
kobject_put(&dev->kobj);
}
+struct class *class_create(struct module *owner, const char *name);
+
static inline int
class_register(struct class *class)
{
@@ -525,25 +527,6 @@
kfree(class);
}
-static inline struct class *
-class_create(struct module *owner, const char *name)
-{
- struct class *class;
- int error;
-
- class = kzalloc(sizeof(*class), M_WAITOK);
- class->owner = owner;
- class->name = name;
- class->class_release = linux_class_kfree;
- error = class_register(class);
- if (error) {
- kfree(class);
- return (NULL);
- }
-
- return (class);
-}
-
static inline void
class_destroy(struct class *class)
{
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
@@ -496,6 +496,25 @@
return ERR_PTR(retval);
}
+struct class *
+class_create(struct module *owner, const char *name)
+{
+ struct class *class;
+ int error;
+
+ class = kzalloc(sizeof(*class), M_WAITOK);
+ class->owner = owner;
+ class->name = name;
+ class->class_release = linux_class_kfree;
+ error = class_register(class);
+ if (error) {
+ kfree(class);
+ return (NULL);
+ }
+
+ return (class);
+}
+
int
kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype,
struct kobject *parent, const char *fmt, ...)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 3:53 PM (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14741904
Default Alt Text
D34769.diff (1 KB)
Attached To
Mode
D34769: linuxkpi: Move class_create to .c file
Attached
Detach File
Event Timeline
Log In to Comment