Lines Matching defs:opts
594 struct f_eem_opts *opts;
596 opts = container_of(f, struct f_eem_opts, func_inst);
597 if (opts->bound)
598 gether_cleanup(netdev_priv(opts->net));
600 free_netdev(opts->net);
601 kfree(opts);
606 struct f_eem_opts *opts;
608 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
609 if (!opts)
611 mutex_init(&opts->lock);
612 opts->func_inst.free_func_inst = eem_free_inst;
613 opts->net = gether_setup_default();
614 if (IS_ERR(opts->net)) {
615 struct net_device *net = opts->net;
616 kfree(opts);
620 config_group_init_type_name(&opts->func_inst.group, "", &eem_func_type);
622 return &opts->func_inst;
628 struct f_eem_opts *opts;
631 opts = container_of(f->fi, struct f_eem_opts, func_inst);
633 mutex_lock(&opts->lock);
634 opts->refcnt--;
635 mutex_unlock(&opts->lock);
648 struct f_eem_opts *opts;
655 opts = container_of(fi, struct f_eem_opts, func_inst);
656 mutex_lock(&opts->lock);
657 opts->refcnt++;
659 eem->port.ioport = netdev_priv(opts->net);
660 mutex_unlock(&opts->lock);