forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/isdn/capi/kcapi_proc.c
....@@ -192,37 +192,15 @@
192192
193193 // ---------------------------------------------------------------------------
194194
195
-static void *capi_driver_start(struct seq_file *seq, loff_t *pos)
196
- __acquires(&capi_drivers_lock)
195
+/* /proc/capi/drivers is always empty */
196
+static ssize_t empty_read(struct file *file, char __user *buf,
197
+ size_t size, loff_t *off)
197198 {
198
- mutex_lock(&capi_drivers_lock);
199
- return seq_list_start(&capi_drivers, *pos);
200
-}
201
-
202
-static void *capi_driver_next(struct seq_file *seq, void *v, loff_t *pos)
203
-{
204
- return seq_list_next(v, &capi_drivers, pos);
205
-}
206
-
207
-static void capi_driver_stop(struct seq_file *seq, void *v)
208
- __releases(&capi_drivers_lock)
209
-{
210
- mutex_unlock(&capi_drivers_lock);
211
-}
212
-
213
-static int capi_driver_show(struct seq_file *seq, void *v)
214
-{
215
- struct capi_driver *drv = list_entry(v, struct capi_driver, list);
216
-
217
- seq_printf(seq, "%-32s %s\n", drv->name, drv->revision);
218199 return 0;
219200 }
220201
221
-static const struct seq_operations seq_capi_driver_ops = {
222
- .start = capi_driver_start,
223
- .next = capi_driver_next,
224
- .stop = capi_driver_stop,
225
- .show = capi_driver_show,
202
+static const struct proc_ops empty_proc_ops = {
203
+ .proc_read = empty_read,
226204 };
227205
228206 // ---------------------------------------------------------------------------
....@@ -236,10 +214,10 @@
236214 proc_create_seq("capi/contrstats", 0, NULL, &seq_contrstats_ops);
237215 proc_create_seq("capi/applications", 0, NULL, &seq_applications_ops);
238216 proc_create_seq("capi/applstats", 0, NULL, &seq_applstats_ops);
239
- proc_create_seq("capi/driver", 0, NULL, &seq_capi_driver_ops);
217
+ proc_create("capi/driver", 0, NULL, &empty_proc_ops);
240218 }
241219
242
-void __exit
220
+void
243221 kcapi_proc_exit(void)
244222 {
245223 remove_proc_entry("capi/driver", NULL);