Skip to contentSkip to conversation

register_chrdev could be replaced by cdev_init

KJ trem 2 participants 2 messages Aug 10, 2005 – Aug 13, 2005 Kernel janitors

lore
Share & tools
lore

trem

author
#0 lore raw

Hi all

I've investigated about char device, and I discover that "register_chrdev" is an old way to register char driver. The new way (good one ?) is "cdev_init".

"register_chrdev" is still used in 2.6.13-rc6:

Quoted 2 lines

find . -name "*.c" -exec grep -l register_chrdev {} \; | wc -l 85

I propose to add this change ("register_chrdev" -> "cdev_init") on the kerneljanitor TODO list.

regards,
trem

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 3 lines · trem

I've investigated about char device, and I discover that "register_chrdev" is an old way to register char driver. The new way (good one ?) is "cdev_init".

The LDD3 book [1] also provides some valuable information about this issue in chapter 3, p. 55-57

In case this is added to KJ TODO, a pointer to [2] (the PDF of the third chapterof LDD3) might be useful.

Cheers, Tobias

[1] http://lwn.net/Kernel/LDD3
[2] http://lwn.net/images/pdf/LDD3/ch03.pdf

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors