The cdev interface
The cdev interface
Posted Nov 26, 2008 13:27 UTC (Wed) by zap (guest, #55327)Parent article: The cdev interface
This article seems a bit outdated, so I'll add my two cents here.
* cdev_add will return -errno as usually, returning 0 means success.
* In order the device to actually apear in the file system, you have to call device_create (class, parent_dev, devno, device_name).
* In order to call device_create you need to have a device class object: either use one of the existing classes, or create your own with create_class (THIS_MODULE, class_name).