Lines Matching refs:misc_dev
125 struct miscdevice misc_dev; member
157 static struct kmod_test_device *misc_dev_to_test_dev(struct miscdevice *misc_dev) in misc_dev_to_test_dev() argument
159 return container_of(misc_dev, struct kmod_test_device, misc_dev); in misc_dev_to_test_dev()
164 struct miscdevice *misc_dev; in dev_to_test_dev() local
166 misc_dev = dev_to_misc_dev(dev); in dev_to_test_dev()
168 return misc_dev_to_test_dev(misc_dev); in dev_to_test_dev()
1071 struct miscdevice *misc_dev; in alloc_test_dev_kmod() local
1090 misc_dev = &test_dev->misc_dev; in alloc_test_dev_kmod()
1092 misc_dev->minor = MISC_DYNAMIC_MINOR; in alloc_test_dev_kmod()
1093 misc_dev->name = kasprintf(GFP_KERNEL, "test_kmod%d", idx); in alloc_test_dev_kmod()
1094 if (!misc_dev->name) { in alloc_test_dev_kmod()
1098 misc_dev->groups = test_dev_groups; in alloc_test_dev_kmod()
1115 kfree_const(test_dev->misc_dev.name); in free_test_dev_kmod()
1116 test_dev->misc_dev.name = NULL; in free_test_dev_kmod()
1141 ret = misc_register(&test_dev->misc_dev); in register_test_dev_kmod()
1149 test_dev->dev = test_dev->misc_dev.this_device; in register_test_dev_kmod()
1204 misc_deregister(&test_dev->misc_dev); in unregister_test_dev_kmod()