This source file includes following definitions.
- static_init
- pcmcia_make_resource
- static_find_io
1
2
3
4
5
6
7
8
9
10
11
12 #include <linux/slab.h>
13 #include <linux/module.h>
14 #include <linux/kernel.h>
15
16 #include <pcmcia/ss.h>
17 #include <pcmcia/cistpl.h>
18 #include "cs_internal.h"
19
20 int static_init(struct pcmcia_socket *s)
21 {
22
23
24
25 s->resource_setup_done = 1;
26
27 return 0;
28 }
29
30 struct resource *pcmcia_make_resource(resource_size_t start,
31 resource_size_t end,
32 unsigned long flags, const char *name)
33 {
34 struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
35
36 if (res) {
37 res->name = name;
38 res->start = start;
39 res->end = start + end - 1;
40 res->flags = flags;
41 }
42 return res;
43 }
44
45 static int static_find_io(struct pcmcia_socket *s, unsigned int attr,
46 unsigned int *base, unsigned int num,
47 unsigned int align, struct resource **parent)
48 {
49 if (!s->io_offset)
50 return -EINVAL;
51 *base = s->io_offset | (*base & 0x0fff);
52 *parent = NULL;
53
54 return 0;
55 }
56
57
58 struct pccard_resource_ops pccard_static_ops = {
59 .validate_mem = NULL,
60 .find_io = static_find_io,
61 .find_mem = NULL,
62 .init = static_init,
63 .exit = NULL,
64 };
65 EXPORT_SYMBOL(pccard_static_ops);
66
67
68 MODULE_AUTHOR("David A. Hinds, Dominik Brodowski");
69 MODULE_LICENSE("GPL");
70 MODULE_ALIAS("rsrc_nonstatic");