Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96030
b: refs/heads/master
c: 9185ef6
h: refs/heads/master
v: v3
  • Loading branch information
Denis V. Lunev authored and Paul Mackerras committed May 5, 2008
1 parent 2780c4b commit f6fda44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 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: b41e5fffe8b81fc939067d8c1c195cc79115d5a3
refs/heads/master: 9185ef6787f1c8f1c06aa0cb3c7746fb4f101f50
19 changes: 2 additions & 17 deletions trunk/arch/powerpc/platforms/pseries/scanlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ static ssize_t scanlog_read(struct file *file, char __user *buf,
dp = PDE(inode);
data = (unsigned int *)dp->data;

if (!data) {
printk(KERN_ERR "scanlog: read failed no data\n");
return -EIO;
}

if (count > RTAS_DATA_BUF_SIZE)
count = RTAS_DATA_BUF_SIZE;

Expand Down Expand Up @@ -146,11 +141,6 @@ static int scanlog_open(struct inode * inode, struct file * file)
struct proc_dir_entry *dp = PDE(inode);
unsigned int *data = (unsigned int *)dp->data;

if (!data) {
printk(KERN_ERR "scanlog: open failed no data\n");
return -EIO;
}

if (data[0] != 0) {
/* This imperfect test stops a second copy of the
* data (or a reset while data is being copied)
Expand All @@ -168,10 +158,6 @@ static int scanlog_release(struct inode * inode, struct file * file)
struct proc_dir_entry *dp = PDE(inode);
unsigned int *data = (unsigned int *)dp->data;

if (!data) {
printk(KERN_ERR "scanlog: release failed no data\n");
return -EIO;
}
data[0] = 0;

return 0;
Expand Down Expand Up @@ -200,12 +186,11 @@ static int __init scanlog_init(void)
if (!data)
goto err;

ent = proc_create("ppc64/rtas/scan-log-dump", S_IRUSR, NULL,
&scanlog_fops);
ent = proc_create_data("ppc64/rtas/scan-log-dump", S_IRUSR, NULL,
&scanlog_fops, data);
if (!ent)
goto err;

ent->data = data;
proc_ppc64_scan_log_dump = ent;

return 0;
Expand Down

0 comments on commit f6fda44

Please sign in to comment.