projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78be3d2
)
Kobject: convert fs/char_dev.c to use kobject_init/add_ng()
author
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 18 Dec 2007 06:05:35 +0000
(23:05 -0700)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 25 Jan 2008 04:40:31 +0000
(20:40 -0800)
This converts the code to use the new kobject functions, cleaning up the
logic in doing so.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/char_dev.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/char_dev.c
b/fs/char_dev.c
index c3bfa76765c45c6c516c467663cdb23e6d08907c..b2dd5a0366316b4df53d0d208b444b4ca74bdd37 100644
(file)
--- a/
fs/char_dev.c
+++ b/
fs/char_dev.c
@@
-510,9
+510,8
@@
struct cdev *cdev_alloc(void)
{
struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);
if (p) {
- p->kobj.ktype = &ktype_cdev_dynamic;
INIT_LIST_HEAD(&p->list);
- kobject_init
(&p->kobj
);
+ kobject_init
_ng(&p->kobj, &ktype_cdev_dynamic
);
}
return p;
}
@@
-529,8
+528,7
@@
void cdev_init(struct cdev *cdev, const struct file_operations *fops)
{
memset(cdev, 0, sizeof *cdev);
INIT_LIST_HEAD(&cdev->list);
- cdev->kobj.ktype = &ktype_cdev_default;
- kobject_init(&cdev->kobj);
+ kobject_init_ng(&cdev->kobj, &ktype_cdev_default);
cdev->ops = fops;
}