Lines Matching refs:opts
431 struct f_gether_opts *opts; in geth_free_inst() local
433 opts = container_of(f, struct f_gether_opts, func_inst); in geth_free_inst()
434 if (opts->bound) in geth_free_inst()
435 gether_cleanup(netdev_priv(opts->net)); in geth_free_inst()
437 free_netdev(opts->net); in geth_free_inst()
438 kfree(opts); in geth_free_inst()
443 struct f_gether_opts *opts; in geth_alloc_inst() local
445 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in geth_alloc_inst()
446 if (!opts) in geth_alloc_inst()
448 mutex_init(&opts->lock); in geth_alloc_inst()
449 opts->func_inst.free_func_inst = geth_free_inst; in geth_alloc_inst()
450 opts->net = gether_setup_default(); in geth_alloc_inst()
451 if (IS_ERR(opts->net)) { in geth_alloc_inst()
452 struct net_device *net = opts->net; in geth_alloc_inst()
453 kfree(opts); in geth_alloc_inst()
457 config_group_init_type_name(&opts->func_inst.group, "", in geth_alloc_inst()
460 return &opts->func_inst; in geth_alloc_inst()
480 struct f_gether_opts *opts; in geth_alloc() local
488 opts = container_of(fi, struct f_gether_opts, func_inst); in geth_alloc()
490 mutex_lock(&opts->lock); in geth_alloc()
491 opts->refcnt++; in geth_alloc()
493 status = gether_get_host_addr_cdc(opts->net, geth->ethaddr, in geth_alloc()
497 mutex_unlock(&opts->lock); in geth_alloc()
502 geth->port.ioport = netdev_priv(opts->net); in geth_alloc()
503 mutex_unlock(&opts->lock); in geth_alloc()