Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3355
b: refs/heads/master
c: d7496cb
h: refs/heads/master
i:
  3353: 4889ffe
  3351: 402ddda
v: v3
  • Loading branch information
Dave Jones authored and Linus Torvalds committed Jun 25, 2005
1 parent 4c2987a commit bf754f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 72414d3f1d22fc3e311b162fca95c430048d38ce
refs/heads/master: d7496cb75ec75b1e74283a481fb02f5d7ce7bdeb
9 changes: 5 additions & 4 deletions trunk/drivers/video/vesafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,11 @@ static int __init vesafb_probe(struct device *device)
unsigned int temp_size = size_total;
/* Find the largest power-of-two */
while (temp_size & (temp_size - 1))
temp_size &= (temp_size - 1);

/* Try and find a power of two to add */
while (temp_size && mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
temp_size &= (temp_size - 1);

/* Try and find a power of two to add */
while (temp_size > PAGE_SIZE &&
mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
temp_size >>= 1;
}
}
Expand Down

0 comments on commit bf754f1

Please sign in to comment.