Release 4.7 drivers/isdn/gigaset/proc.c
/*
* Stuff used by all variants of the driver
*
* Copyright (c) 2001 by Stefan Eilers,
* Hansjoerg Lipp <hjlipp@web.de>,
* Tilman Schmidt <tilman@imap.cc>.
*
* =====================================================================
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
* =====================================================================
*/
#include "gigaset.h"
static ssize_t show_cidmode(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct cardstate *cs = dev_get_drvdata(dev);
return sprintf(buf, "%u\n", cs->cidmode);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hansjoerg lipp | hansjoerg lipp | 31 | 73.81% | 1 | 25.00% |
greg kroah-hartman | greg kroah-hartman | 9 | 21.43% | 1 | 25.00% |
tilman schmidt | tilman schmidt | 2 | 4.76% | 2 | 50.00% |
| Total | 42 | 100.00% | 4 | 100.00% |
static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct cardstate *cs = dev_get_drvdata(dev);
long int value;
char *end;
value = simple_strtol(buf, &end, 0);
while (*end)
if (!isspace(*end++))
return -EINVAL;
if (value < 0 || value > 1)
return -EINVAL;
if (mutex_lock_interruptible(&cs->mutex))
return -ERESTARTSYS;
cs->waiting = 1;
if (!gigaset_add_event(cs, &cs->at_state, EV_PROC_CIDMODE,
NULL, value, NULL)) {
cs->waiting = 0;
mutex_unlock(&cs->mutex);
return -ENOMEM;
}
gigaset_schedule_event(cs);
wait_event(cs->waitqueue, !cs->waiting);
mutex_unlock(&cs->mutex);
return count;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hansjoerg lipp | hansjoerg lipp | 161 | 91.48% | 1 | 33.33% |
greg kroah-hartman | greg kroah-hartman | 9 | 5.11% | 1 | 33.33% |
tilman schmidt | tilman schmidt | 6 | 3.41% | 1 | 33.33% |
| Total | 176 | 100.00% | 3 | 100.00% |
static DEVICE_ATTR(cidmode, S_IRUGO | S_IWUSR, show_cidmode, set_cidmode);
/* free sysfs for device */
void gigaset_free_dev_sysfs(struct cardstate *cs)
{
if (!cs->tty_dev)
return;
gig_dbg(DEBUG_INIT, "removing sysfs entries");
device_remove_file(cs->tty_dev, &dev_attr_cidmode);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hansjoerg lipp | hansjoerg lipp | 27 | 77.14% | 2 | 40.00% |
tilman schmidt | tilman schmidt | 4 | 11.43% | 2 | 40.00% |
greg kroah-hartman | greg kroah-hartman | 4 | 11.43% | 1 | 20.00% |
| Total | 35 | 100.00% | 5 | 100.00% |
/* initialize sysfs for device */
void gigaset_init_dev_sysfs(struct cardstate *cs)
{
if (!cs->tty_dev)
return;
gig_dbg(DEBUG_INIT, "setting up sysfs");
if (device_create_file(cs->tty_dev, &dev_attr_cidmode))
pr_err("could not create sysfs attribute\n");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hansjoerg lipp | hansjoerg lipp | 27 | 64.29% | 2 | 28.57% |
tilman schmidt | tilman schmidt | 11 | 26.19% | 4 | 57.14% |
greg kroah-hartman | greg kroah-hartman | 4 | 9.52% | 1 | 14.29% |
| Total | 42 | 100.00% | 7 | 100.00% |
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hansjoerg lipp | hansjoerg lipp | 264 | 83.81% | 2 | 18.18% |
greg kroah-hartman | greg kroah-hartman | 27 | 8.57% | 1 | 9.09% |
tilman schmidt | tilman schmidt | 24 | 7.62% | 8 | 72.73% |
| Total | 315 | 100.00% | 11 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.