Lines Matching refs:opts
417 struct f_gether_opts *opts; in geth_free_inst() local
419 opts = container_of(f, struct f_gether_opts, func_inst); in geth_free_inst()
420 if (opts->bound) in geth_free_inst()
421 gether_cleanup(netdev_priv(opts->net)); in geth_free_inst()
423 free_netdev(opts->net); in geth_free_inst()
424 kfree(opts); in geth_free_inst()
429 struct f_gether_opts *opts; in geth_alloc_inst() local
431 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in geth_alloc_inst()
432 if (!opts) in geth_alloc_inst()
434 mutex_init(&opts->lock); in geth_alloc_inst()
435 opts->func_inst.free_func_inst = geth_free_inst; in geth_alloc_inst()
436 opts->net = gether_setup_default(); in geth_alloc_inst()
437 if (IS_ERR(opts->net)) { in geth_alloc_inst()
438 struct net_device *net = opts->net; in geth_alloc_inst()
439 kfree(opts); in geth_alloc_inst()
443 config_group_init_type_name(&opts->func_inst.group, "", in geth_alloc_inst()
446 return &opts->func_inst; in geth_alloc_inst()
466 struct f_gether_opts *opts; in geth_alloc() local
474 opts = container_of(fi, struct f_gether_opts, func_inst); in geth_alloc()
476 mutex_lock(&opts->lock); in geth_alloc()
477 opts->refcnt++; in geth_alloc()
479 status = gether_get_host_addr_cdc(opts->net, geth->ethaddr, in geth_alloc()
483 mutex_unlock(&opts->lock); in geth_alloc()
488 geth->port.ioport = netdev_priv(opts->net); in geth_alloc()
489 mutex_unlock(&opts->lock); in geth_alloc()