Lines Matching refs:opts
423 struct f_gether_opts *opts; in geth_free_inst() local
425 opts = container_of(f, struct f_gether_opts, func_inst); in geth_free_inst()
426 if (opts->bound) in geth_free_inst()
427 gether_cleanup(netdev_priv(opts->net)); in geth_free_inst()
429 free_netdev(opts->net); in geth_free_inst()
430 kfree(opts); in geth_free_inst()
435 struct f_gether_opts *opts; in geth_alloc_inst() local
437 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in geth_alloc_inst()
438 if (!opts) in geth_alloc_inst()
440 mutex_init(&opts->lock); in geth_alloc_inst()
441 opts->func_inst.free_func_inst = geth_free_inst; in geth_alloc_inst()
442 opts->net = gether_setup_default(); in geth_alloc_inst()
443 if (IS_ERR(opts->net)) { in geth_alloc_inst()
444 struct net_device *net = opts->net; in geth_alloc_inst()
445 kfree(opts); in geth_alloc_inst()
449 config_group_init_type_name(&opts->func_inst.group, "", in geth_alloc_inst()
452 return &opts->func_inst; in geth_alloc_inst()
472 struct f_gether_opts *opts; in geth_alloc() local
480 opts = container_of(fi, struct f_gether_opts, func_inst); in geth_alloc()
482 mutex_lock(&opts->lock); in geth_alloc()
483 opts->refcnt++; in geth_alloc()
485 status = gether_get_host_addr_cdc(opts->net, geth->ethaddr, in geth_alloc()
489 mutex_unlock(&opts->lock); in geth_alloc()
494 geth->port.ioport = netdev_priv(opts->net); in geth_alloc()
495 mutex_unlock(&opts->lock); in geth_alloc()