xref: /OK3568_Linux_fs/kernel/net/atm/resources.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /* net/atm/resources.h - ATM-related resources */
3*4882a593Smuzhiyun 
4*4882a593Smuzhiyun /* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifndef NET_ATM_RESOURCES_H
8*4882a593Smuzhiyun #define NET_ATM_RESOURCES_H
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #include <linux/atmdev.h>
11*4882a593Smuzhiyun #include <linux/mutex.h>
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun extern struct list_head atm_devs;
15*4882a593Smuzhiyun extern struct mutex atm_dev_mutex;
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun int atm_getnames(void __user *buf, int __user *iobuf_len);
18*4882a593Smuzhiyun int atm_dev_ioctl(unsigned int cmd, void __user *buf, int __user *sioc_len,
19*4882a593Smuzhiyun 		  int number, int compat);
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #ifdef CONFIG_PROC_FS
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #include <linux/proc_fs.h>
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos);
26*4882a593Smuzhiyun void atm_dev_seq_stop(struct seq_file *seq, void *v);
27*4882a593Smuzhiyun void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun int atm_proc_dev_register(struct atm_dev *dev);
31*4882a593Smuzhiyun void atm_proc_dev_deregister(struct atm_dev *dev);
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun #else
34*4882a593Smuzhiyun 
atm_proc_dev_register(struct atm_dev * dev)35*4882a593Smuzhiyun static inline int atm_proc_dev_register(struct atm_dev *dev)
36*4882a593Smuzhiyun {
37*4882a593Smuzhiyun 	return 0;
38*4882a593Smuzhiyun }
39*4882a593Smuzhiyun 
atm_proc_dev_deregister(struct atm_dev * dev)40*4882a593Smuzhiyun static inline void atm_proc_dev_deregister(struct atm_dev *dev)
41*4882a593Smuzhiyun {
42*4882a593Smuzhiyun 	/* nothing */
43*4882a593Smuzhiyun }
44*4882a593Smuzhiyun 
45*4882a593Smuzhiyun #endif /* CONFIG_PROC_FS */
46*4882a593Smuzhiyun 
47*4882a593Smuzhiyun int atm_register_sysfs(struct atm_dev *adev, struct device *parent);
48*4882a593Smuzhiyun void atm_unregister_sysfs(struct atm_dev *adev);
49*4882a593Smuzhiyun #endif
50