• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/s390/appldata/

Lines Matching refs:ops

132 	struct appldata_ops *ops;
139 ops = list_entry(lh, struct appldata_ops, list);
140 if (ops->active == 1) {
141 ops->callback(ops->data);
340 struct appldata_ops *ops = NULL, *tmp_ops;
357 ops = ctl->data;
358 if (!try_module_get(ops->owner)) { // protect this function
366 module_put(ops->owner);
370 len = sprintf(buf, ops->active ? "1\n" : "0\n");
374 module_put(ops->owner);
382 module_put(ops->owner);
387 if ((buf[0] == '1') && (ops->active == 0)) {
389 if (!try_module_get(ops->owner)) {
391 module_put(ops->owner);
394 ops->callback(ops->data); // init record
395 rc = appldata_diag(ops->record_nr,
397 (unsigned long) ops->data, ops->size,
398 ops->mod_lvl);
401 "failed with rc=%d\n", ops->name, rc);
402 module_put(ops->owner);
404 ops->active = 1;
405 } else if ((buf[0] == '0') && (ops->active == 1)) {
406 ops->active = 0;
407 rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC,
408 (unsigned long) ops->data, ops->size,
409 ops->mod_lvl);
412 "failed with rc=%d\n", ops->name, rc);
413 module_put(ops->owner);
419 module_put(ops->owner);
426 /************************* module-ops management *****************************/
430 * update ops list, register /proc/sys entries
432 int appldata_register_ops(struct appldata_ops *ops)
434 if (ops->size > APPLDATA_MAX_REC_SIZE)
437 ops->ctl_table = kzalloc(4 * sizeof(struct ctl_table), GFP_KERNEL);
438 if (!ops->ctl_table)
442 list_add(&ops->list, &appldata_ops_list);
445 ops->ctl_table[0].procname = appldata_proc_name;
446 ops->ctl_table[0].maxlen = 0;
447 ops->ctl_table[0].mode = S_IRUGO | S_IXUGO;
448 ops->ctl_table[0].child = &ops->ctl_table[2];
450 ops->ctl_table[2].procname = ops->name;
451 ops->ctl_table[2].mode = S_IRUGO | S_IWUSR;
452 ops->ctl_table[2].proc_handler = appldata_generic_handler;
453 ops->ctl_table[2].data = ops;
455 ops->sysctl_header = register_sysctl_table(ops->ctl_table);
456 if (!ops->sysctl_header)
461 list_del(&ops->list);
463 kfree(ops->ctl_table);
470 * update ops list, unregister /proc entries, stop DIAG if necessary
472 void appldata_unregister_ops(struct appldata_ops *ops)
475 list_del(&ops->list);
477 unregister_sysctl_table(ops->sysctl_header);
478 kfree(ops->ctl_table);
480 /********************** module-ops management <END> **************************/
486 struct appldata_ops *ops;
501 ops = list_entry(lh, struct appldata_ops, list);
502 if (ops->active == 1) {
503 rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC,
504 (unsigned long) ops->data, ops->size,
505 ops->mod_lvl);
508 "failed with rc=%d\n", ops->name, rc);
517 struct appldata_ops *ops;
532 ops = list_entry(lh, struct appldata_ops, list);
533 if (ops->active == 1) {
534 ops->callback(ops->data); // init record
535 rc = appldata_diag(ops->record_nr,
537 (unsigned long) ops->data, ops->size,
538 ops->mod_lvl);
541 "failed with rc=%d\n", ops->name, rc);