????????????MISC???豸?????????????????
misc->this_device = device_create(misc_class?? misc->parent?? dev??
misc?? "%s"?? misc->name);
???????У?
struct miscdevice * misc??
struct device *this_device;
static struct class *misc_class;
struct device *parent;
dev = MKDEV(MISC_MAJOR?? misc->minor);  //?豸??
misc->name    //?豸????????
?????????????????????????????豸????????????????linux-3.0????μ??
??????linux???2.6????????????豸??????????????????????????????class_create????豸???????class?????????豸???? class_device_create??????????豸???????÷????£?
????struct class *myclass = class_create(THIS_MODULE?? “my_device_driver”);
????//????????????????????????????sysfs????
????class_device_create(myclass?? NULL?? MKDEV(major_num?? 0)?? NULL?? “my_device”);
????//??/dev???′?????????豸???
?????????????/include/linux/device.h??
????????????汾??????????????  device_create
??????????module?????????udev daemon ???????? device_create(…)???????/sysfs?????????????????????/dev?′???my_device?豸?????
???????????????device_create_file????????????
????err = device_create_file(dev?? attr);