staging: comedi: change comedi_alloc_subdevice_minor parameters
[firefly-linux-kernel-4.4.55.git] / drivers / staging / comedi / comedi_internal.h
1 #ifndef _COMEDI_INTERNAL_H
2 #define _COMEDI_INTERNAL_H
3
4 #include <linux/types.h>
5
6 /*
7  * various internal comedi stuff
8  */
9 int do_rangeinfo_ioctl(struct comedi_device *dev,
10                        struct comedi_rangeinfo __user *arg);
11 int comedi_alloc_board_minor(struct device *hardware_device);
12 void comedi_free_board_minor(unsigned minor);
13 int comedi_find_board_minor(struct device *hardware_device);
14 int comedi_alloc_subdevice_minor(struct comedi_subdevice *s);
15 void comedi_free_subdevice_minor(struct comedi_subdevice *s);
16
17 int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
18                      unsigned long new_size);
19 void comedi_buf_reset(struct comedi_async *async);
20 unsigned int comedi_buf_write_n_allocated(struct comedi_async *async);
21
22 extern unsigned int comedi_default_buf_size_kb;
23 extern unsigned int comedi_default_buf_maxsize_kb;
24 extern bool comedi_autoconfig;
25
26 /* drivers.c */
27
28 extern struct comedi_driver *comedi_drivers;
29
30 int insn_inval(struct comedi_device *, struct comedi_subdevice *,
31                struct comedi_insn *, unsigned int *);
32
33 void comedi_device_detach(struct comedi_device *);
34 int comedi_device_attach(struct comedi_device *, struct comedi_devconfig *);
35
36 #ifdef CONFIG_PROC_FS
37
38 /* proc.c */
39
40 void comedi_proc_init(void);
41 void comedi_proc_cleanup(void);
42 #else
43 static inline void comedi_proc_init(void)
44 {
45 }
46 static inline void comedi_proc_cleanup(void)
47 {
48 }
49 #endif
50
51 #endif /* _COMEDI_INTERNAL_H */