]> err.no Git - linux-2.6/blobdiff - fs/char_dev.c
ftrace: Documentation
[linux-2.6] / fs / char_dev.c
index b2dd5a0366316b4df53d0d208b444b4ca74bdd37..68e510b88457e85d8831aa0b48a0479c137d3cb3 100644 (file)
@@ -55,7 +55,6 @@ static struct char_device_struct {
        unsigned int baseminor;
        int minorct;
        char name[64];
-       struct file_operations *fops;
        struct cdev *cdev;              /* will die */
 } *chrdevs[CHRDEV_MAJOR_HASH_SIZE];
 
@@ -357,7 +356,7 @@ void cdev_put(struct cdev *p)
 /*
  * Called every time a character special file is opened
  */
-int chrdev_open(struct inode * inode, struct file * filp)
+static int chrdev_open(struct inode *inode, struct file *filp)
 {
        struct cdev *p;
        struct cdev *new = NULL;
@@ -511,7 +510,7 @@ struct cdev *cdev_alloc(void)
        struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);
        if (p) {
                INIT_LIST_HEAD(&p->list);
-               kobject_init_ng(&p->kobj, &ktype_cdev_dynamic);
+               kobject_init(&p->kobj, &ktype_cdev_dynamic);
        }
        return p;
 }
@@ -528,7 +527,7 @@ void cdev_init(struct cdev *cdev, const struct file_operations *fops)
 {
        memset(cdev, 0, sizeof *cdev);
        INIT_LIST_HEAD(&cdev->list);
-       kobject_init_ng(&cdev->kobj, &ktype_cdev_default);
+       kobject_init(&cdev->kobj, &ktype_cdev_default);
        cdev->ops = fops;
 }