Lines Matching defs:opts

1201 	struct f_printer_opts *opts = to_f_printer_opts(item);
1203 usb_put_function_instance(&opts->func_inst);
1213 struct f_printer_opts *opts = to_f_printer_opts(item);
1216 mutex_lock(&opts->lock);
1217 if (!opts->pnp_string)
1220 result = strlcpy(page, opts->pnp_string, PAGE_SIZE);
1229 mutex_unlock(&opts->lock);
1237 struct f_printer_opts *opts = to_f_printer_opts(item);
1241 mutex_lock(&opts->lock);
1249 if (opts->pnp_string_allocated)
1250 kfree(opts->pnp_string);
1252 opts->pnp_string_allocated = true;
1253 opts->pnp_string = new_pnp;
1256 mutex_unlock(&opts->lock);
1266 struct f_printer_opts *opts = to_f_printer_opts(item);
1269 mutex_lock(&opts->lock);
1270 result = sprintf(page, "%d\n", opts->q_len);
1271 mutex_unlock(&opts->lock);
1279 struct f_printer_opts *opts = to_f_printer_opts(item);
1283 mutex_lock(&opts->lock);
1284 if (opts->refcnt) {
1293 opts->q_len = (unsigned)num;
1296 mutex_unlock(&opts->lock);
1337 struct f_printer_opts *opts;
1339 opts = container_of(f, struct f_printer_opts, func_inst);
1343 gprinter_put_minor(opts->minor);
1349 if (opts->pnp_string_allocated)
1350 kfree(opts->pnp_string);
1351 kfree(opts);
1356 struct f_printer_opts *opts;
1360 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
1361 if (!opts)
1364 mutex_init(&opts->lock);
1365 opts->func_inst.free_func_inst = gprinter_free_inst;
1366 ret = &opts->func_inst;
1374 kfree(opts);
1379 opts->minor = gprinter_get_minor();
1380 if (opts->minor < 0) {
1381 ret = ERR_PTR(opts->minor);
1382 kfree(opts);
1387 config_group_init_type_name(&opts->func_inst.group, "",
1398 struct f_printer_opts *opts;
1400 opts = container_of(f->fi, struct f_printer_opts, func_inst);
1403 mutex_lock(&opts->lock);
1404 --opts->refcnt;
1405 mutex_unlock(&opts->lock);
1455 struct f_printer_opts *opts;
1457 opts = container_of(fi, struct f_printer_opts, func_inst);
1459 mutex_lock(&opts->lock);
1460 if (opts->minor >= minors) {
1461 mutex_unlock(&opts->lock);
1467 mutex_unlock(&opts->lock);
1472 ++opts->refcnt;
1473 dev->minor = opts->minor;
1474 dev->pnp_string = &opts->pnp_string;
1475 dev->q_len = opts->q_len;
1476 mutex_unlock(&opts->lock);