aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-06-27 18:57:04 -0400
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 17:27:06 -0400
commita1802c42950403657d07e64558eff612d550ce16 (patch)
treefc5713105b852ff71263ec73eb53a74d5e7e4f4d
parent08c9f262f268f7948be13bf3a5bda1d635c649b4 (diff)
PNP: make resource option structures private to PNP subsystem
Nothing outside the PNP subsystem should need access to a device's resource options, so this patch moves the option structure declarations to a private header file. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/pnp/base.h48
-rw-r--r--include/linux/pnp.h48
2 files changed, 48 insertions, 48 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h
index 1667ac3ca45b..3126e4582008 100644
--- a/drivers/pnp/base.h
+++ b/drivers/pnp/base.h
@@ -19,6 +19,54 @@ void pnp_remove_card(struct pnp_card *card);
19int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); 19int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev);
20void pnp_remove_card_device(struct pnp_dev *dev); 20void pnp_remove_card_device(struct pnp_dev *dev);
21 21
22struct pnp_port {
23 unsigned short min; /* min base number */
24 unsigned short max; /* max base number */
25 unsigned char align; /* align boundary */
26 unsigned char size; /* size of range */
27 unsigned char flags; /* port flags */
28 unsigned char pad; /* pad */
29 struct pnp_port *next; /* next port */
30};
31
32#define PNP_IRQ_NR 256
33struct pnp_irq {
34 DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmask for IRQ lines */
35 unsigned char flags; /* IRQ flags */
36 unsigned char pad; /* pad */
37 struct pnp_irq *next; /* next IRQ */
38};
39
40struct pnp_dma {
41 unsigned char map; /* bitmask for DMA channels */
42 unsigned char flags; /* DMA flags */
43 struct pnp_dma *next; /* next port */
44};
45
46struct pnp_mem {
47 unsigned int min; /* min base number */
48 unsigned int max; /* max base number */
49 unsigned int align; /* align boundary */
50 unsigned int size; /* size of range */
51 unsigned char flags; /* memory flags */
52 unsigned char pad; /* pad */
53 struct pnp_mem *next; /* next memory resource */
54};
55
56#define PNP_RES_PRIORITY_PREFERRED 0
57#define PNP_RES_PRIORITY_ACCEPTABLE 1
58#define PNP_RES_PRIORITY_FUNCTIONAL 2
59#define PNP_RES_PRIORITY_INVALID 65535
60
61struct pnp_option {
62 unsigned short priority; /* priority */
63 struct pnp_port *port; /* first port */
64 struct pnp_irq *irq; /* first IRQ */
65 struct pnp_dma *dma; /* first DMA */
66 struct pnp_mem *mem; /* first memory resource */
67 struct pnp_option *next; /* used to chain dependent resources */
68};
69
22struct pnp_option *pnp_build_option(int priority); 70struct pnp_option *pnp_build_option(int priority);
23struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev); 71struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev);
24struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, 72struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev,
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index e1454dabde10..785126ffcc11 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -182,54 +182,6 @@ static inline int pnp_dma_valid(struct pnp_dev *dev, unsigned int bar)
182} 182}
183 183
184 184
185struct pnp_port {
186 unsigned short min; /* min base number */
187 unsigned short max; /* max base number */
188 unsigned char align; /* align boundary */
189 unsigned char size; /* size of range */
190 unsigned char flags; /* port flags */
191 unsigned char pad; /* pad */
192 struct pnp_port *next; /* next port */
193};
194
195#define PNP_IRQ_NR 256
196struct pnp_irq {
197 DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmask for IRQ lines */
198 unsigned char flags; /* IRQ flags */
199 unsigned char pad; /* pad */
200 struct pnp_irq *next; /* next IRQ */
201};
202
203struct pnp_dma {
204 unsigned char map; /* bitmask for DMA channels */
205 unsigned char flags; /* DMA flags */
206 struct pnp_dma *next; /* next port */
207};
208
209struct pnp_mem {
210 unsigned int min; /* min base number */
211 unsigned int max; /* max base number */
212 unsigned int align; /* align boundary */
213 unsigned int size; /* size of range */
214 unsigned char flags; /* memory flags */
215 unsigned char pad; /* pad */
216 struct pnp_mem *next; /* next memory resource */
217};
218
219#define PNP_RES_PRIORITY_PREFERRED 0
220#define PNP_RES_PRIORITY_ACCEPTABLE 1
221#define PNP_RES_PRIORITY_FUNCTIONAL 2
222#define PNP_RES_PRIORITY_INVALID 65535
223
224struct pnp_option {
225 unsigned short priority; /* priority */
226 struct pnp_port *port; /* first port */
227 struct pnp_irq *irq; /* first IRQ */
228 struct pnp_dma *dma; /* first DMA */
229 struct pnp_mem *mem; /* first memory resource */
230 struct pnp_option *next; /* used to chain dependent resources */
231};
232
233/* 185/*
234 * Device Management 186 * Device Management
235 */ 187 */