static struct class *firstdrv_class;
static struct class_device *firstdrv_dev;
入口:
firstdrv_class = class_creat(THIS_MODULE,"firstdrv");
firstdrv_drv = class_device_creat(firstdrv_class,NULL,MKDEV(mayjor,0),NULL,"xyz");
出口:
class_device_unregister(firstdrv_drv);
class_destroy(firstdrv_class);
阅读(1658) | 评论(0) | 转发(0) |