Lines Matching refs:fc
33 struct fc_instance *fc; in fc_open() local
36 list_for_each_entry(fc, &fc_devices, list) in fc_open()
37 if (fc->misc.minor == minor) in fc_open()
39 if (fc->misc.minor != minor) in fc_open()
41 fmc = fc->fmc; in fc_open()
130 struct fc_instance *fc; in fc_probe() local
138 fc = kzalloc(sizeof(*fc), GFP_KERNEL); in fc_probe()
139 if (!fc) in fc_probe()
141 fc->fmc = fmc; in fc_probe()
142 fc->misc.minor = MISC_DYNAMIC_MINOR; in fc_probe()
143 fc->misc.fops = &fc_fops; in fc_probe()
144 fc->misc.name = kstrdup(dev_name(&fmc->dev), GFP_KERNEL); in fc_probe()
146 ret = misc_register(&fc->misc); in fc_probe()
150 list_add(&fc->list, &fc_devices); in fc_probe()
152 dev_info(&fc->fmc->dev, "Created misc device \"%s\"\n", in fc_probe()
153 fc->misc.name); in fc_probe()
157 kfree(fc->misc.name); in fc_probe()
158 kfree(fc); in fc_probe()
164 struct fc_instance *fc; in fc_remove() local
166 list_for_each_entry(fc, &fc_devices, list) in fc_remove()
167 if (fc->fmc == fmc) in fc_remove()
169 if (fc->fmc != fmc) { in fc_remove()
175 list_del(&fc->list); in fc_remove()
177 misc_deregister(&fc->misc); in fc_remove()
178 kfree(fc->misc.name); in fc_remove()
179 kfree(fc); in fc_remove()