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