Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106993
b: refs/heads/master
c: 1a4e564
h: refs/heads/master
i:
  106991: 2b372cb
v: v3
  • Loading branch information
Magnus Damm authored and Linus Torvalds committed Jul 30, 2008
1 parent d70ab93 commit 0c77a1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e958d3ace7791f33518f0259cd3cf229408b135c
refs/heads/master: 1a4e564b7db999fbe5d88318c96ac8747699d417
4 changes: 4 additions & 0 deletions trunk/include/linux/ioport.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ extern int allocate_resource(struct resource *root, struct resource *new,
int adjust_resource(struct resource *res, resource_size_t start,
resource_size_t size);
resource_size_t resource_alignment(struct resource *res);
static inline resource_size_t resource_size(struct resource *res)
{
return res->end - res->start + 1;
}

/* Convenience shorthand with allocation */
#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ resource_size_t resource_alignment(struct resource *res)
{
switch (res->flags & (IORESOURCE_SIZEALIGN | IORESOURCE_STARTALIGN)) {
case IORESOURCE_SIZEALIGN:
return res->end - res->start + 1;
return resource_size(res);
case IORESOURCE_STARTALIGN:
return res->start;
default:
Expand Down

0 comments on commit 0c77a1c

Please sign in to comment.