diff options
Diffstat (limited to 'arch/mips/lasat/picvue_proc.c')
-rw-r--r-- | arch/mips/lasat/picvue_proc.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c index 2bcd8391bc93..b42095880667 100644 --- a/arch/mips/lasat/picvue_proc.c +++ b/arch/mips/lasat/picvue_proc.c | |||
@@ -22,7 +22,6 @@ | |||
22 | static DEFINE_MUTEX(pvc_mutex); | 22 | static DEFINE_MUTEX(pvc_mutex); |
23 | static char pvc_lines[PVC_NLINES][PVC_LINELEN+1]; | 23 | static char pvc_lines[PVC_NLINES][PVC_LINELEN+1]; |
24 | static int pvc_linedata[PVC_NLINES]; | 24 | static int pvc_linedata[PVC_NLINES]; |
25 | static struct proc_dir_entry *pvc_display_dir; | ||
26 | static char *pvc_linename[PVC_NLINES] = {"line1", "line2"}; | 25 | static char *pvc_linename[PVC_NLINES] = {"line1", "line2"}; |
27 | #define DISPLAY_DIR_NAME "display" | 26 | #define DISPLAY_DIR_NAME "display" |
28 | static int scroll_dir, scroll_interval; | 27 | static int scroll_dir, scroll_interval; |
@@ -169,22 +168,17 @@ void pvc_proc_timerfunc(unsigned long data) | |||
169 | 168 | ||
170 | static void pvc_proc_cleanup(void) | 169 | static void pvc_proc_cleanup(void) |
171 | { | 170 | { |
172 | int i; | 171 | remove_proc_subtree(DISPLAY_DIR_NAME, NULL); |
173 | for (i = 0; i < PVC_NLINES; i++) | ||
174 | remove_proc_entry(pvc_linename[i], pvc_display_dir); | ||
175 | remove_proc_entry("scroll", pvc_display_dir); | ||
176 | remove_proc_entry(DISPLAY_DIR_NAME, NULL); | ||
177 | |||
178 | del_timer_sync(&timer); | 172 | del_timer_sync(&timer); |
179 | } | 173 | } |
180 | 174 | ||
181 | static int __init pvc_proc_init(void) | 175 | static int __init pvc_proc_init(void) |
182 | { | 176 | { |
183 | struct proc_dir_entry *proc_entry; | 177 | struct proc_dir_entry *dir, *proc_entry; |
184 | int i; | 178 | int i; |
185 | 179 | ||
186 | pvc_display_dir = proc_mkdir(DISPLAY_DIR_NAME, NULL); | 180 | dir = proc_mkdir(DISPLAY_DIR_NAME, NULL); |
187 | if (pvc_display_dir == NULL) | 181 | if (dir == NULL) |
188 | goto error; | 182 | goto error; |
189 | 183 | ||
190 | for (i = 0; i < PVC_NLINES; i++) { | 184 | for (i = 0; i < PVC_NLINES; i++) { |
@@ -192,12 +186,12 @@ static int __init pvc_proc_init(void) | |||
192 | pvc_linedata[i] = i; | 186 | pvc_linedata[i] = i; |
193 | } | 187 | } |
194 | for (i = 0; i < PVC_NLINES; i++) { | 188 | for (i = 0; i < PVC_NLINES; i++) { |
195 | proc_entry = proc_create_data(pvc_linename[i], 0644, pvc_display_dir, | 189 | proc_entry = proc_create_data(pvc_linename[i], 0644, dir, |
196 | &pvc_line_proc_fops, &pvc_linedata[i]); | 190 | &pvc_line_proc_fops, &pvc_linedata[i]); |
197 | if (proc_entry == NULL) | 191 | if (proc_entry == NULL) |
198 | goto error; | 192 | goto error; |
199 | } | 193 | } |
200 | proc_entry = proc_create("scroll", 0644, pvc_display_dir, | 194 | proc_entry = proc_create("scroll", 0644, dir, |
201 | &pvc_scroll_proc_fops); | 195 | &pvc_scroll_proc_fops); |
202 | if (proc_entry == NULL) | 196 | if (proc_entry == NULL) |
203 | goto error; | 197 | goto error; |