Release 4.18 drivers/staging/comedi/proc.c
// SPDX-License-Identifier: GPL-2.0+
/*
* /proc interface for comedi
*
* COMEDI - Linux Control and Measurement Device Interface
* Copyright (C) 1998 David A. Schleef <ds@schleef.org>
*/
/*
* This is some serious bloatware.
*
* Taken from Dave A.'s PCL-711 driver, 'cuz I thought it
* was cool.
*/
#include "comedidev.h"
#include "comedi_internal.h"
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
static int comedi_read(struct seq_file *m, void *v)
{
int i;
int devices_q = 0;
struct comedi_driver *driv;
seq_printf(m, "comedi version " COMEDI_RELEASE "\nformat string: %s\n",
"\"%2d: %-20s %-20s %4d\", i, driver_name, board_name, n_subdevices");
for (i = 0; i < COMEDI_NUM_BOARD_MINORS; i++) {
struct comedi_device *dev = comedi_dev_get_from_minor(i);
if (!dev)
continue;
down_read(&dev->attach_lock);
if (dev->attached) {
devices_q = 1;
seq_printf(m, "%2d: %-20s %-20s %4d\n",
i, dev->driver->driver_name,
dev->board_name, dev->n_subdevices);
}
up_read(&dev->attach_lock);
comedi_dev_put(dev);
}
if (!devices_q)
seq_puts(m, "no devices\n");
mutex_lock(&comedi_drivers_list_lock);
for (driv = comedi_drivers; driv; driv = driv->next) {
seq_printf(m, "%s:\n", driv->driver_name);
for (i = 0; i < driv->num_names; i++)
seq_printf(m, " %s\n",
*(char **)((char *)driv->board_name +
i * driv->offset));
if (!driv->num_names)
seq_printf(m, " %s\n", driv->driver_name);
}
mutex_unlock(&comedi_drivers_list_lock);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David A. Schleef | 180 | 74.38% | 1 | 12.50% |
Ian Abbott | 34 | 14.05% | 2 | 25.00% |
David Howells | 19 | 7.85% | 1 | 12.50% |
H Hartley Sweeten | 4 | 1.65% | 1 | 12.50% |
Greg Kroah-Hartman | 2 | 0.83% | 1 | 12.50% |
Michael Welling | 2 | 0.83% | 1 | 12.50% |
Bill Pemberton | 1 | 0.41% | 1 | 12.50% |
Total | 242 | 100.00% | 8 | 100.00% |
void __init comedi_proc_init(void)
{
if (!proc_create_single("comedi", 0444, NULL, comedi_read))
pr_warn("comedi: unable to create proc entry\n");
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David A. Schleef | 12 | 44.44% | 1 | 14.29% |
Cheah Kok Cheong | 10 | 37.04% | 3 | 42.86% |
Christoph Hellwig | 2 | 7.41% | 1 | 14.29% |
Al Viro | 2 | 7.41% | 1 | 14.29% |
Greg Kroah-Hartman | 1 | 3.70% | 1 | 14.29% |
Total | 27 | 100.00% | 7 | 100.00% |
void comedi_proc_cleanup(void)
{
remove_proc_entry("comedi", NULL);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David A. Schleef | 13 | 92.86% | 1 | 50.00% |
Greg Kroah-Hartman | 1 | 7.14% | 1 | 50.00% |
Total | 14 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
David A. Schleef | 211 | 70.81% | 1 | 5.88% |
Ian Abbott | 35 | 11.74% | 3 | 17.65% |
David Howells | 20 | 6.71% | 1 | 5.88% |
Greg Kroah-Hartman | 10 | 3.36% | 4 | 23.53% |
Cheah Kok Cheong | 10 | 3.36% | 3 | 17.65% |
H Hartley Sweeten | 4 | 1.34% | 1 | 5.88% |
Michael Welling | 3 | 1.01% | 1 | 5.88% |
Al Viro | 2 | 0.67% | 1 | 5.88% |
Christoph Hellwig | 2 | 0.67% | 1 | 5.88% |
Bill Pemberton | 1 | 0.34% | 1 | 5.88% |
Total | 298 | 100.00% | 17 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.