forked from KolibriOS/kolibrios
ddk: update
git-svn-id: svn://kolibrios.org@6102 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -23,12 +23,6 @@ struct resource {
|
||||
struct resource *parent, *sibling, *child;
|
||||
};
|
||||
|
||||
struct resource_list {
|
||||
struct resource_list *next;
|
||||
struct resource *res;
|
||||
struct pci_dev *dev;
|
||||
};
|
||||
|
||||
/*
|
||||
* IO resources have these defined flags.
|
||||
*/
|
||||
@@ -176,6 +170,15 @@ static inline unsigned long resource_type(const struct resource *res)
|
||||
{
|
||||
return res->flags & IORESOURCE_TYPE_BITS;
|
||||
}
|
||||
/* True iff r1 completely contains r2 */
|
||||
static inline bool resource_contains(struct resource *r1, struct resource *r2)
|
||||
{
|
||||
if (resource_type(r1) != resource_type(r2))
|
||||
return false;
|
||||
if (r1->flags & IORESOURCE_UNSET || r2->flags & IORESOURCE_UNSET)
|
||||
return false;
|
||||
return r1->start <= r2->start && r1->end >= r2->end;
|
||||
}
|
||||
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
Reference in New Issue
Block a user