You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* cdev_init() - initialize a cdev structure
* @cdev: the structure to initialize
* @fops: the file_operations for this device
*
* Initializes @cdev, remembering @fops, making it ready to add to the
* system with cdev_add().
*/
void cdev_init(struct cdev *cdev, const struct file_operations *fops)
{
memset(cdev, 0, sizeof *cdev);
INIT_LIST_HEAD(&cdev->list);
kobject_init(&cdev->kobj, &ktype_cdev_default);
cdev->ops = fops;
}
The text was updated successfully, but these errors were encountered:
dwalkes
pushed a commit
to cu-ecen-aeld/ldd3
that referenced
this issue
Aug 30, 2020
ldd3/scull/main.c
Line 607 in bdf0647
Hi, martinezjavier.
The assignment operation: "dev->cdev.ops = &scull_fops;", already included in function cdev_init, whether in v2.6.12 or in v5.1-rc4.
so, the assignment is redundant?
The following code is taken from :
https://github.com/torvalds/linux/blob/master/fs/char_dev.c
v5.1-rc4
The text was updated successfully, but these errors were encountered: