usb_put_function_instance(&opts->func_inst); } static struct configfs_item_operations serial_item_ops = { .release = serial_attr_release, .show_attribute = f_serial_attr_show, }; static ssize_t f_serial_port_num_show(struct f_serial_opts *opts, char *page) { return sprintf(page, "%u\n", opts->port_num); } static struct f_serial_opts_attribute f_serial_port_num = __CONFIGFS_ATTR_RO(port_num, f_serial_port_num_show); static struct configfs_attribute *acm_attrs[] = { &f_serial_port_num.attr, NULL, }; static struct config_item_type serial_func_type = { .ct_item_ops = &serial_item_ops, .ct_attrs = acm_attrs, .ct_owner = THIS_MODULE, }; static void gser_free_inst(struct usb_function_instance *f) { struct f_serial_opts *opts;
usb_put_function_instance(&opts->func_inst); } static struct configfs_item_operations acm_item_ops = { .release = acm_attr_release, .show_attribute = f_acm_attr_show, }; static ssize_t f_acm_port_num_show(struct f_serial_opts *opts, char *page) { return sprintf(page, "%u\n", opts->port_num); } static struct f_serial_opts_attribute f_acm_port_num = __CONFIGFS_ATTR_RO(port_num, f_acm_port_num_show); static struct configfs_attribute *acm_attrs[] = { &f_acm_port_num.attr, NULL, }; static struct config_item_type acm_func_type = { .ct_item_ops = &acm_item_ops, .ct_attrs = acm_attrs, .ct_owner = THIS_MODULE, }; static void acm_free_instance(struct usb_function_instance *fi) {