#define THIS_DESCRIPTION "
This module is a dummy device driver, it registern
tta char device, and utilize udev to create/destroy n
ttdevice node under /dev/ dynamicallly."
/* creating your own class */
my_class = class_create(THIS_MODULE, "dummy_class");
if(IS_ERR(my_class)) {
printk("Err: failed in creating class.n");
return -1;
}
/* register your own device in sysfs, and this will cause udevd to create corresponding device node */
class_device_create(my_class, NULL, MKDEV(DUMMY_MAJOR, DUMMY_MINOR), NULL, DUMMY_NAME "%d", DUMMY_MINOR );