Lines Matching refs:misc_dev
132 struct miscdevice misc_dev; member
164 static struct kmod_test_device *misc_dev_to_test_dev(struct miscdevice *misc_dev) in misc_dev_to_test_dev() argument
166 return container_of(misc_dev, struct kmod_test_device, misc_dev); in misc_dev_to_test_dev()
171 struct miscdevice *misc_dev; in dev_to_test_dev() local
173 misc_dev = dev_to_misc_dev(dev); in dev_to_test_dev()
175 return misc_dev_to_test_dev(misc_dev); in dev_to_test_dev()
1084 struct miscdevice *misc_dev; in alloc_test_dev_kmod() local
1103 misc_dev = &test_dev->misc_dev; in alloc_test_dev_kmod()
1105 misc_dev->minor = MISC_DYNAMIC_MINOR; in alloc_test_dev_kmod()
1106 misc_dev->name = kasprintf(GFP_KERNEL, "test_kmod%d", idx); in alloc_test_dev_kmod()
1107 if (!misc_dev->name) { in alloc_test_dev_kmod()
1111 misc_dev->groups = test_dev_groups; in alloc_test_dev_kmod()
1128 kfree_const(test_dev->misc_dev.name); in free_test_dev_kmod()
1129 test_dev->misc_dev.name = NULL; in free_test_dev_kmod()
1154 ret = misc_register(&test_dev->misc_dev); in register_test_dev_kmod()
1162 test_dev->dev = test_dev->misc_dev.this_device; in register_test_dev_kmod()
1217 misc_deregister(&test_dev->misc_dev); in unregister_test_dev_kmod()