Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5746
b: refs/heads/master
c: dc9352a
h: refs/heads/master
v: v3
  • Loading branch information
Markus Lidel authored and Linus Torvalds committed Aug 10, 2005
1 parent 3ae612a commit 3deff3b
Show file tree
Hide file tree
Showing 2 changed files with 11 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: a7df26da158ad64d56cc32934aa38a07d03a6fc9
refs/heads/master: dc9352a42c6de578c932313448257cf246b2b75f
10 changes: 10 additions & 0 deletions trunk/drivers/message/i2o/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <linux/i2o.h>
#include "core.h"

#define OSM_DESCRIPTION "I2O-subsystem"

/* PCI device id table for all I2O controllers */
static struct pci_device_id __devinitdata i2o_pci_ids[] = {
{PCI_DEVICE_CLASS(PCI_CLASS_INTELLIGENT_I2O << 8, 0xffff00)},
Expand Down Expand Up @@ -66,6 +68,8 @@ static void i2o_pci_free(struct i2o_controller *c)

if (c->base.virt)
iounmap(c->base.virt);

pci_release_regions(c->pdev);
}

/**
Expand All @@ -84,6 +88,11 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
struct device *dev = &pdev->dev;
int i;

if (pci_request_regions(pdev, OSM_DESCRIPTION)) {
printk(KERN_ERR "%s: device already claimed\n", c->name);
return -ENODEV;
}

for (i = 0; i < 6; i++) {
/* Skip I/O spaces */
if (!(pci_resource_flags(pdev, i) & IORESOURCE_IO)) {
Expand Down Expand Up @@ -138,6 +147,7 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
c->base.virt = ioremap_nocache(c->base.phys, c->base.len);
if (!c->base.virt) {
printk(KERN_ERR "%s: Unable to map controller.\n", c->name);
i2o_pci_free(c);
return -ENOMEM;
}

Expand Down

0 comments on commit 3deff3b

Please sign in to comment.