I have written a simple char driver code. I am trying to register my device. I can see my device name in /proc/devices file with major number. But after registration I am unable to see my device in /dev directory..I used register_chrdev() call,it is returning non negative value..I also tried using cdev_init() and cdev_add() calls but still the same thing is happening.
Asked
Active
Viewed 137 times
1
-
See this question: http://stackoverflow.com/questions/5970595/create-a-device-node-in-code/ – Eugene Jan 22 '14 at 07:54
1 Answers
0
udev creates the /dev entry. To trigger udev, the driver needs to call device_create() which creates an entry under /sys/dev along with the device name.

stark
- 12,615
- 3
- 33
- 50
-
`device_create()` will make udev create the appropriate device node, no need to specify the rule explicitly here. – Eugene Jan 22 '14 at 07:55