Rev 6082 | Rev 6936 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6082 | Rev 6102 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | const char *name; |
21 | const char *name; |
22 | unsigned long flags; |
22 | unsigned long flags; |
23 | struct resource *parent, *sibling, *child; |
23 | struct resource *parent, *sibling, *child; |
24 | }; |
24 | }; |
Line 25... | Line -... | ||
25 | - | ||
26 | struct resource_list { |
- | |
27 | struct resource_list *next; |
- | |
28 | struct resource *res; |
- | |
29 | struct pci_dev *dev; |
- | |
30 | }; |
- | |
31 | 25 | ||
32 | /* |
26 | /* |
33 | * IO resources have these defined flags. |
27 | * IO resources have these defined flags. |
34 | */ |
28 | */ |
Line 174... | Line 168... | ||
174 | } |
168 | } |
175 | static inline unsigned long resource_type(const struct resource *res) |
169 | static inline unsigned long resource_type(const struct resource *res) |
176 | { |
170 | { |
177 | return res->flags & IORESOURCE_TYPE_BITS; |
171 | return res->flags & IORESOURCE_TYPE_BITS; |
178 | } |
172 | } |
- | 173 | /* True iff r1 completely contains r2 */ |
|
- | 174 | static inline bool resource_contains(struct resource *r1, struct resource *r2) |
|
- | 175 | { |
|
- | 176 | if (resource_type(r1) != resource_type(r2)) |
|
- | 177 | return false; |
|
- | 178 | if (r1->flags & IORESOURCE_UNSET || r2->flags & IORESOURCE_UNSET) |
|
- | 179 | return false; |
|
- | 180 | return r1->start <= r2->start && r1->end >= r2->end; |
|
- | 181 | } |
|
Line 179... | Line 182... | ||
179 | 182 | ||
180 | 183 |