Lines Matching refs:opts
592 struct f_eem_opts *opts;
594 opts = container_of(f, struct f_eem_opts, func_inst);
595 if (opts->bound)
596 gether_cleanup(netdev_priv(opts->net));
598 free_netdev(opts->net);
599 kfree(opts);
604 struct f_eem_opts *opts;
606 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
607 if (!opts)
609 mutex_init(&opts->lock);
610 opts->func_inst.free_func_inst = eem_free_inst;
611 opts->net = gether_setup_default();
612 if (IS_ERR(opts->net)) {
613 struct net_device *net = opts->net;
614 kfree(opts);
618 config_group_init_type_name(&opts->func_inst.group, "", &eem_func_type);
620 return &opts->func_inst;
626 struct f_eem_opts *opts;
629 opts = container_of(f->fi, struct f_eem_opts, func_inst);
631 mutex_lock(&opts->lock);
632 opts->refcnt--;
633 mutex_unlock(&opts->lock);
646 struct f_eem_opts *opts;
653 opts = container_of(fi, struct f_eem_opts, func_inst);
654 mutex_lock(&opts->lock);
655 opts->refcnt++;
657 eem->port.ioport = netdev_priv(opts->net);
658 mutex_unlock(&opts->lock);