Lines Matching refs:opts

597 	struct f_phonet_opts *opts = to_f_phonet_opts(item);  in f_phonet_attr_show()  local
603 ret = f_phonet_opts_attr->show(opts, page); in f_phonet_attr_show()
609 struct f_phonet_opts *opts = to_f_phonet_opts(item); in phonet_attr_release() local
611 usb_put_function_instance(&opts->func_inst); in phonet_attr_release()
619 static ssize_t f_phonet_ifname_show(struct f_phonet_opts *opts, char *page) in f_phonet_ifname_show() argument
621 return gether_get_ifname(opts->net, page, PAGE_SIZE); in f_phonet_ifname_show()
640 struct f_phonet_opts *opts; in phonet_free_inst() local
642 opts = container_of(f, struct f_phonet_opts, func_inst); in phonet_free_inst()
643 if (opts->bound) in phonet_free_inst()
644 gphonet_cleanup(opts->net); in phonet_free_inst()
646 free_netdev(opts->net); in phonet_free_inst()
647 kfree(opts); in phonet_free_inst()
652 struct f_phonet_opts *opts; in phonet_alloc_inst() local
654 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in phonet_alloc_inst()
655 if (!opts) in phonet_alloc_inst()
658 opts->func_inst.free_func_inst = phonet_free_inst; in phonet_alloc_inst()
659 opts->net = gphonet_setup_default(); in phonet_alloc_inst()
660 if (IS_ERR(opts->net)) { in phonet_alloc_inst()
661 struct net_device *net = opts->net; in phonet_alloc_inst()
662 kfree(opts); in phonet_alloc_inst()
666 config_group_init_type_name(&opts->func_inst.group, "", in phonet_alloc_inst()
669 return &opts->func_inst; in phonet_alloc_inst()
698 struct f_phonet_opts *opts; in phonet_alloc() local
706 opts = container_of(fi, struct f_phonet_opts, func_inst); in phonet_alloc()
708 fp->dev = opts->net; in phonet_alloc()