unsigned int baseminor;
int minorct;
char name[64];
- struct file_operations *fops;
struct cdev *cdev; /* will die */
} *chrdevs[CHRDEV_MAJOR_HASH_SIZE];
/*
* 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;
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;
}
{
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;
}