diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:18:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:18:30 -0500 |
commit | 8d37a371b6869920e6c40c495c68eabba1ef3909 (patch) | |
tree | dad784512b13832f4f5494cfe0791965c6a2b0f6 /drivers/pcmcia/rsrc_mgr.c | |
parent | ef1a8de8ea004a689b2aa9f5cefcba2b1a0262f2 (diff) | |
parent | 7b4884ca8853a638df0eb5d251d80d67777b8b1a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (49 commits)
pcmcia: validate late-added resources
pcmcia: allow for extension of resource interval
pcmcia: remove useless msleep in ds.c
pcmcia: use read_cis_mem return value
pcmcia: handle error in serial_cs config calls
pcmcia: add locking to pcmcia_{read,write}_cis_mem
pcmcia: avoid prod_id memleak
pcmcia: avoid sysfs-related lockup for cardbus
pcmcia: use state machine for extended requery
pcmcia: delay re-scanning and re-querying of PCMCIA bus
pcmcia: use pccardd to handle eject, insert, suspend and resume requests
pcmcia: use ops_mutex for rsrc_{mgr,nonstatic} locking
pcmcia: use mutex for dynid lock
pcmcia: assert locking to struct pcmcia_device
pcmcia: add locking documentation
pcmcia: simplify locking
pcmcia: add locking to struct pcmcia_socket->pcmcia_state()
pcmcia: protect s->device_count
pcmcia: properly lock skt->irq, skt->irq_mask
pcmcia: lock ops->set_socket
...
Diffstat (limited to 'drivers/pcmcia/rsrc_mgr.c')
-rw-r--r-- | drivers/pcmcia/rsrc_mgr.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c index f8401a0ef89b..e6f7d410aed6 100644 --- a/drivers/pcmcia/rsrc_mgr.c +++ b/drivers/pcmcia/rsrc_mgr.c | |||
@@ -21,60 +21,12 @@ | |||
21 | #include <pcmcia/cistpl.h> | 21 | #include <pcmcia/cistpl.h> |
22 | #include "cs_internal.h" | 22 | #include "cs_internal.h" |
23 | 23 | ||
24 | |||
25 | int pcmcia_validate_mem(struct pcmcia_socket *s) | ||
26 | { | ||
27 | if (s->resource_ops->validate_mem) | ||
28 | return s->resource_ops->validate_mem(s); | ||
29 | /* if there is no callback, we can assume that everything is OK */ | ||
30 | return 0; | ||
31 | } | ||
32 | EXPORT_SYMBOL(pcmcia_validate_mem); | ||
33 | |||
34 | int pcmcia_adjust_io_region(struct resource *res, unsigned long r_start, | ||
35 | unsigned long r_end, struct pcmcia_socket *s) | ||
36 | { | ||
37 | if (s->resource_ops->adjust_io_region) | ||
38 | return s->resource_ops->adjust_io_region(res, r_start, r_end, s); | ||
39 | return -ENOMEM; | ||
40 | } | ||
41 | EXPORT_SYMBOL(pcmcia_adjust_io_region); | ||
42 | |||
43 | struct resource *pcmcia_find_io_region(unsigned long base, int num, | ||
44 | unsigned long align, struct pcmcia_socket *s) | ||
45 | { | ||
46 | if (s->resource_ops->find_io) | ||
47 | return s->resource_ops->find_io(base, num, align, s); | ||
48 | return NULL; | ||
49 | } | ||
50 | EXPORT_SYMBOL(pcmcia_find_io_region); | ||
51 | |||
52 | struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, | ||
53 | int low, struct pcmcia_socket *s) | ||
54 | { | ||
55 | if (s->resource_ops->find_mem) | ||
56 | return s->resource_ops->find_mem(base, num, align, low, s); | ||
57 | return NULL; | ||
58 | } | ||
59 | EXPORT_SYMBOL(pcmcia_find_mem_region); | ||
60 | |||
61 | void release_resource_db(struct pcmcia_socket *s) | ||
62 | { | ||
63 | if (s->resource_ops->exit) | ||
64 | s->resource_ops->exit(s); | ||
65 | } | ||
66 | |||
67 | |||
68 | static int static_init(struct pcmcia_socket *s) | 24 | static int static_init(struct pcmcia_socket *s) |
69 | { | 25 | { |
70 | unsigned long flags; | ||
71 | |||
72 | /* the good thing about SS_CAP_STATIC_MAP sockets is | 26 | /* the good thing about SS_CAP_STATIC_MAP sockets is |
73 | * that they don't need a resource database */ | 27 | * that they don't need a resource database */ |
74 | 28 | ||
75 | spin_lock_irqsave(&s->lock, flags); | ||
76 | s->resource_setup_done = 1; | 29 | s->resource_setup_done = 1; |
77 | spin_unlock_irqrestore(&s->lock, flags); | ||
78 | 30 | ||
79 | return 0; | 31 | return 0; |
80 | } | 32 | } |