summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/ds1620.c7
-rw-r--r--drivers/staging/comedi/proc.c7
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)
return ret;
#ifdef THERM_USE_PROC
- proc_therm_ds1620 = create_proc_entry("therm", 0, NULL);
- if (proc_therm_ds1620)
- proc_therm_ds1620->read_proc = proc_therm_ds1620_read;
- else
+ proc_therm_ds1620 = create_proc_read_entry("therm", 0, NULL,
+ proc_therm_ds1620_read, NULL);
+ if (!proc_therm_ds1620)
printk(KERN_ERR "therm: unable to register /proc/therm\n");
#endif
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,
void comedi_proc_init(void)
{
- struct proc_dir_entry *comedi_proc;
-
- comedi_proc = create_proc_entry("comedi", S_IFREG | S_IRUGO, NULL);
- if (comedi_proc)
- comedi_proc->read_proc = comedi_read;
+ create_proc_read_entry("comedi", S_IFREG | S_IRUGO, NULL,
+ comedi_read, NULL);
}
void comedi_proc_cleanup(void)