Function report |
Source Code:block\bsg.c |
Create Date:2022-07-28 17:37:58 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:bsg_init
Proto:static int __init bsg_init(void)
Type:int
Parameter:Nothing
| 486 | When i < BSG_LIST_ARRAY_SIZE cycle INIT_HLIST_HEAD( & bsg_device_list[i]) |
| 489 | bsg_class = This is a #define to keep the compiler from merging different* instances of the __key variable (THIS_MODULE, "bsg") |
| 492 | devnode = bsg_devnode |
| 494 | ret = alloc_chrdev_region( & devid, 0, BSG_MAX_DEVS, "bsg") |
| 495 | If ret Then Go to destroy_bsg_class |
| 502 | If ret Then Go to unregister_chrdev |
| 507 | Return 0 |
| 508 | unregister_chrdev : |
| 509 | unregister_chrdev_region(MKDEV(bsg_major, 0), BSG_MAX_DEVS) |
| 510 | destroy_bsg_class : |
| 511 | class_destroy(bsg_class) |
| 512 | Return ret |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |