@@ -108,32 +108,6 @@ static const struct seq_operations seq_contrstats_ops = {
108108 .show = contrstats_show ,
109109};
110110
111- static int seq_controller_open (struct inode * inode , struct file * file )
112- {
113- return seq_open (file , & seq_controller_ops );
114- }
115-
116- static int seq_contrstats_open (struct inode * inode , struct file * file )
117- {
118- return seq_open (file , & seq_contrstats_ops );
119- }
120-
121- static const struct file_operations proc_controller_ops = {
122- .owner = THIS_MODULE ,
123- .open = seq_controller_open ,
124- .read = seq_read ,
125- .llseek = seq_lseek ,
126- .release = seq_release ,
127- };
128-
129- static const struct file_operations proc_contrstats_ops = {
130- .owner = THIS_MODULE ,
131- .open = seq_contrstats_open ,
132- .read = seq_read ,
133- .llseek = seq_lseek ,
134- .release = seq_release ,
135- };
136-
137111// /proc/capi/applications:
138112// applid l3cnt dblkcnt dblklen #ncci recvqueuelen
139113// /proc/capi/applstats:
@@ -216,34 +190,6 @@ static const struct seq_operations seq_applstats_ops = {
216190 .show = applstats_show ,
217191};
218192
219- static int
220- seq_applications_open (struct inode * inode , struct file * file )
221- {
222- return seq_open (file , & seq_applications_ops );
223- }
224-
225- static int
226- seq_applstats_open (struct inode * inode , struct file * file )
227- {
228- return seq_open (file , & seq_applstats_ops );
229- }
230-
231- static const struct file_operations proc_applications_ops = {
232- .owner = THIS_MODULE ,
233- .open = seq_applications_open ,
234- .read = seq_read ,
235- .llseek = seq_lseek ,
236- .release = seq_release ,
237- };
238-
239- static const struct file_operations proc_applstats_ops = {
240- .owner = THIS_MODULE ,
241- .open = seq_applstats_open ,
242- .read = seq_read ,
243- .llseek = seq_lseek ,
244- .release = seq_release ,
245- };
246-
247193// ---------------------------------------------------------------------------
248194
249195static void * capi_driver_start (struct seq_file * seq , loff_t * pos )
@@ -279,34 +225,18 @@ static const struct seq_operations seq_capi_driver_ops = {
279225 .show = capi_driver_show ,
280226};
281227
282- static int
283- seq_capi_driver_open (struct inode * inode , struct file * file )
284- {
285- int err ;
286- err = seq_open (file , & seq_capi_driver_ops );
287- return err ;
288- }
289-
290- static const struct file_operations proc_driver_ops = {
291- .owner = THIS_MODULE ,
292- .open = seq_capi_driver_open ,
293- .read = seq_read ,
294- .llseek = seq_lseek ,
295- .release = seq_release ,
296- };
297-
298228// ---------------------------------------------------------------------------
299229
300230void __init
301231kcapi_proc_init (void )
302232{
303233 proc_mkdir ("capi" , NULL );
304234 proc_mkdir ("capi/controllers" , NULL );
305- proc_create ("capi/controller" , 0 , NULL , & proc_controller_ops );
306- proc_create ("capi/contrstats" , 0 , NULL , & proc_contrstats_ops );
307- proc_create ("capi/applications" , 0 , NULL , & proc_applications_ops );
308- proc_create ("capi/applstats" , 0 , NULL , & proc_applstats_ops );
309- proc_create ("capi/driver" , 0 , NULL , & proc_driver_ops );
235+ proc_create_seq ("capi/controller" , 0 , NULL , & seq_controller_ops );
236+ proc_create_seq ("capi/contrstats" , 0 , NULL , & seq_contrstats_ops );
237+ proc_create_seq ("capi/applications" , 0 , NULL , & seq_applications_ops );
238+ proc_create_seq ("capi/applstats" , 0 , NULL , & seq_applstats_ops );
239+ proc_create_seq ("capi/driver" , 0 , NULL , & seq_capi_driver_ops );
310240}
311241
312242void __exit
0 commit comments