Lines Matching refs: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()
427 current_minor = ida_simple_get(&comp.minor_id, 0, 0, GFP_KERNEL); in comp_probe()
437 c->devno = MKDEV(comp.major, current_minor); in comp_probe()
457 c->dev = device_create(comp.class, NULL, c->devno, NULL, "%s", name); in comp_probe()
474 ida_simple_remove(&comp.minor_id, current_minor); in comp_probe()
478 static struct cdev_component comp = { variable
493 comp.class = class_create(THIS_MODULE, "most_cdev"); in mod_init()
494 if (IS_ERR(comp.class)) in mod_init()
495 return PTR_ERR(comp.class); in mod_init()
499 ida_init(&comp.minor_id); in mod_init()
501 err = alloc_chrdev_region(&comp.devno, 0, CHRDEV_REGION_SIZE, "cdev"); in mod_init()
504 comp.major = MAJOR(comp.devno); in mod_init()
505 err = most_register_component(&comp.cc); in mod_init()
508 err = most_register_configfs_subsys(&comp.cc); in mod_init()
514 most_deregister_component(&comp.cc); in mod_init()
516 unregister_chrdev_region(comp.devno, CHRDEV_REGION_SIZE); in mod_init()
518 ida_destroy(&comp.minor_id); in mod_init()
519 class_destroy(comp.class); in mod_init()
527 most_deregister_configfs_subsys(&comp.cc); in mod_exit()
528 most_deregister_component(&comp.cc); in mod_exit()
534 unregister_chrdev_region(comp.devno, CHRDEV_REGION_SIZE); in mod_exit()
535 ida_destroy(&comp.minor_id); in mod_exit()
536 class_destroy(comp.class); in mod_exit()