Lines Matching defs:opts
419 struct f_gether_opts *opts;
421 opts = container_of(f, struct f_gether_opts, func_inst);
422 if (opts->bound)
423 gether_cleanup(netdev_priv(opts->net));
425 free_netdev(opts->net);
426 kfree(opts);
431 struct f_gether_opts *opts;
433 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
434 if (!opts)
436 mutex_init(&opts->lock);
437 opts->func_inst.free_func_inst = geth_free_inst;
438 opts->net = gether_setup_default();
439 if (IS_ERR(opts->net)) {
440 struct net_device *net = opts->net;
441 kfree(opts);
445 config_group_init_type_name(&opts->func_inst.group, "",
448 return &opts->func_inst;
468 struct f_gether_opts *opts;
476 opts = container_of(fi, struct f_gether_opts, func_inst);
478 mutex_lock(&opts->lock);
479 opts->refcnt++;
481 status = gether_get_host_addr_cdc(opts->net, geth->ethaddr,
485 mutex_unlock(&opts->lock);
490 geth->port.ioport = netdev_priv(opts->net);
491 mutex_unlock(&opts->lock);