This source file includes following definitions.
- pc236_attach
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 #include <linux/module.h>
35
36 #include "../comedidev.h"
37
38 #include "amplc_pc236.h"
39
40 static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
41 {
42 struct pc236_private *devpriv;
43 int ret;
44
45 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
46 if (!devpriv)
47 return -ENOMEM;
48
49 ret = comedi_request_region(dev, it->options[0], 0x4);
50 if (ret)
51 return ret;
52
53 return amplc_pc236_common_attach(dev, dev->iobase, it->options[1], 0);
54 }
55
56 static const struct pc236_board pc236_boards[] = {
57 {
58 .name = "pc36at",
59 },
60 };
61
62 static struct comedi_driver amplc_pc236_driver = {
63 .driver_name = "amplc_pc236",
64 .module = THIS_MODULE,
65 .attach = pc236_attach,
66 .detach = comedi_legacy_detach,
67 .board_name = &pc236_boards[0].name,
68 .offset = sizeof(struct pc236_board),
69 .num_names = ARRAY_SIZE(pc236_boards),
70 };
71
72 module_comedi_driver(amplc_pc236_driver);
73
74 MODULE_AUTHOR("Comedi http://www.comedi.org");
75 MODULE_DESCRIPTION("Comedi driver for Amplicon PC36AT DIO boards");
76 MODULE_LICENSE("GPL");