diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-30 13:26:37 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:10 -0400 |
commit | e784788ddb7000dbea8bd2986a3f83c4d77f96ff (patch) | |
tree | b542d12760edac644ae39f0f3c6cef0f49882eff /drivers | |
parent | 96e7d9158f5ae91accb9c81cca14bcd0c996c0cc (diff) |
get rid of a bunch of open-coded create_proc_read_entry()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ds1620.c | 7 | ||||
-rw-r--r-- | drivers/staging/comedi/proc.c | 7 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 24ffd8cec51e..b599fae698df 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c | |||
@@ -397,10 +397,9 @@ static int __init ds1620_init(void) | |||
397 | return ret; | 397 | return ret; |
398 | 398 | ||
399 | #ifdef THERM_USE_PROC | 399 | #ifdef THERM_USE_PROC |
400 | proc_therm_ds1620 = create_proc_entry("therm", 0, NULL); | 400 | proc_therm_ds1620 = create_proc_read_entry("therm", 0, NULL, |
401 | if (proc_therm_ds1620) | 401 | proc_therm_ds1620_read, NULL); |
402 | proc_therm_ds1620->read_proc = proc_therm_ds1620_read; | 402 | if (!proc_therm_ds1620) |
403 | else | ||
404 | printk(KERN_ERR "therm: unable to register /proc/therm\n"); | 403 | printk(KERN_ERR "therm: unable to register /proc/therm\n"); |
405 | #endif | 404 | #endif |
406 | 405 | ||
diff --git a/drivers/staging/comedi/proc.c b/drivers/staging/comedi/proc.c index 362c214bcc0b..f01e0cccac3b 100644 --- a/drivers/staging/comedi/proc.c +++ b/drivers/staging/comedi/proc.c | |||
@@ -80,11 +80,8 @@ static int comedi_read(char *buf, char **start, off_t offset, int len, | |||
80 | 80 | ||
81 | void comedi_proc_init(void) | 81 | void comedi_proc_init(void) |
82 | { | 82 | { |
83 | struct proc_dir_entry *comedi_proc; | 83 | create_proc_read_entry("comedi", S_IFREG | S_IRUGO, NULL, |
84 | 84 | comedi_read, NULL); | |
85 | comedi_proc = create_proc_entry("comedi", S_IFREG | S_IRUGO, NULL); | ||
86 | if (comedi_proc) | ||
87 | comedi_proc->read_proc = comedi_read; | ||
88 | } | 85 | } |
89 | 86 | ||
90 | void comedi_proc_cleanup(void) | 87 | void comedi_proc_cleanup(void) |