Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90393
b: refs/heads/master
c: 1119d57
h: refs/heads/master
i:
  90391: a722290
v: v3
  • Loading branch information
Pavel Emelyanov authored and Jeff Garzik committed Mar 26, 2008
1 parent 655c6a1 commit 73272bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57bb7e222804c68066e3e995dffbedda5b1ec1ea
refs/heads/master: 1119d577ccfeb727e3f26f07e612d6f2a9c349e7
42 changes: 3 additions & 39 deletions trunk/drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,26 +1259,7 @@ static void ibmveth_proc_unregister_driver(void)
remove_proc_entry(IBMVETH_PROC_DIR, init_net.proc_net);
}

static void *ibmveth_seq_start(struct seq_file *seq, loff_t *pos)
{
if (*pos == 0) {
return (void *)1;
} else {
return NULL;
}
}

static void *ibmveth_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
++*pos;
return NULL;
}

static void ibmveth_seq_stop(struct seq_file *seq, void *v)
{
}

static int ibmveth_seq_show(struct seq_file *seq, void *v)
static int ibmveth_show(struct seq_file *seq, void *v)
{
struct ibmveth_adapter *adapter = seq->private;
char *current_mac = ((char*) &adapter->netdev->dev_addr);
Expand All @@ -1302,35 +1283,18 @@ static int ibmveth_seq_show(struct seq_file *seq, void *v)

return 0;
}
static struct seq_operations ibmveth_seq_ops = {
.start = ibmveth_seq_start,
.next = ibmveth_seq_next,
.stop = ibmveth_seq_stop,
.show = ibmveth_seq_show,
};

static int ibmveth_proc_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
struct proc_dir_entry *proc;
int rc;

rc = seq_open(file, &ibmveth_seq_ops);
if (!rc) {
/* recover the pointer buried in proc_dir_entry data */
seq = file->private_data;
proc = PDE(inode);
seq->private = proc->data;
}
return rc;
return single_open(file, ibmveth_show, PDE(inode)->data);
}

static const struct file_operations ibmveth_proc_fops = {
.owner = THIS_MODULE,
.open = ibmveth_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = single_release,
};

static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter)
Expand Down

0 comments on commit 73272bf

Please sign in to comment.