Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325226
b: refs/heads/master
c: 6b2a7e0
h: refs/heads/master
v: v3
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Sep 12, 2012
1 parent 983f37f commit 574d530
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a09f347c6cc0b2821557d1346c4733cc78a79ffa
refs/heads/master: 6b2a7e0c9bcc0a4df385d1ef8fe5109cea0260e2
4 changes: 4 additions & 0 deletions trunk/drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
struct fb_info *fb_info;
struct xgifb_video_info *xgifb_info;
struct xgi_hw_device_info *hw_info;
unsigned long video_size_max;

fb_info = framebuffer_alloc(sizeof(*xgifb_info), &pdev->dev);
if (!fb_info)
Expand All @@ -1720,6 +1721,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
xgifb_info->subsysvendor = pdev->subsystem_vendor;
xgifb_info->subsysdevice = pdev->subsystem_device;

video_size_max = pci_resource_len(pdev, 0);
xgifb_info->video_base = pci_resource_start(pdev, 0);
xgifb_info->mmio_base = pci_resource_start(pdev, 1);
xgifb_info->mmio_size = pci_resource_len(pdev, 1);
Expand Down Expand Up @@ -1780,6 +1782,8 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
"Fatal error: Unable to determine RAM size.\n");
ret = -ENODEV;
goto error_disable;
} else if (xgifb_info->video_size > video_size_max) {
xgifb_info->video_size = video_size_max;
}

/* Enable PCI_LINEAR_ADDRESSING and MMIO_ENABLE */
Expand Down

0 comments on commit 574d530

Please sign in to comment.