Lines Matching full:comp
28 } comp; variable
52 return channel_has_mbo(c->iface, c->channel_id, &comp.cc) > 0; in ch_has_mbo()
58 *mbo = most_get_mbo(c->iface, c->channel_id, &comp.cc); in ch_get_mbo()
87 most_stop_channel(c->iface, c->channel_id, &comp.cc); in stop_channel()
94 device_destroy(comp.class, c->devno); in destroy_cdev()
103 ida_simple_remove(&comp.minor_id, MINOR(c->devno)); in destroy_channel()
143 ret = most_start_channel(c->iface, c->channel_id, &comp.cc); in comp_open()
428 current_minor = ida_simple_get(&comp.minor_id, 0, 0, GFP_KERNEL); in comp_probe()
438 c->devno = MKDEV(comp.major, current_minor); in comp_probe()
458 c->dev = device_create(comp.class, NULL, c->devno, NULL, "%s", name); in comp_probe()
475 ida_simple_remove(&comp.minor_id, current_minor); in comp_probe()
479 static struct cdev_component comp = { variable
494 comp.class = class_create("most_cdev"); in most_cdev_init()
495 if (IS_ERR(comp.class)) in most_cdev_init()
496 return PTR_ERR(comp.class); in most_cdev_init()
498 ida_init(&comp.minor_id); in most_cdev_init()
500 err = alloc_chrdev_region(&comp.devno, 0, CHRDEV_REGION_SIZE, "cdev"); in most_cdev_init()
503 comp.major = MAJOR(comp.devno); in most_cdev_init()
504 err = most_register_component(&comp.cc); in most_cdev_init()
507 err = most_register_configfs_subsys(&comp.cc); in most_cdev_init()
513 most_deregister_component(&comp.cc); in most_cdev_init()
515 unregister_chrdev_region(comp.devno, CHRDEV_REGION_SIZE); in most_cdev_init()
517 ida_destroy(&comp.minor_id); in most_cdev_init()
518 class_destroy(comp.class); in most_cdev_init()
526 most_deregister_configfs_subsys(&comp.cc); in most_cdev_exit()
527 most_deregister_component(&comp.cc); in most_cdev_exit()
533 unregister_chrdev_region(comp.devno, CHRDEV_REGION_SIZE); in most_cdev_exit()
534 ida_destroy(&comp.minor_id); in most_cdev_exit()
535 class_destroy(comp.class); in most_cdev_exit()