summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-03-30 19:35:59 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-03-30 19:35:59 +0200
commitcb0527c1f0764723cb701c07a3f8a5b9a5c09348 (patch)
tree30611215ae170181033408204a688a148d297355
parentd4c0c0a141b0a7e8da3c70b06110bb5fe9aa11f5 (diff)
.
-rw-r--r--nvlib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/nvlib.h b/nvlib.h
index c677127..08bd1fd 100644
--- a/nvlib.h
+++ b/nvlib.h
@@ -344,9 +344,9 @@ struct nv_device : public nv_region
: nv_region(dev)
{
size = 1 << 24;
- pci_device_map_range(dev->pci, dev->pci->regions[0].base_addr, size, PCI_DEV_MAP_FLAG_WRITABLE, (void**)&ptr);
+ pci_device_map_range(dev->pci, dev->pci->regions[1].base_addr, size, PCI_DEV_MAP_FLAG_WRITABLE, (void**)&ptr);
if (!ptr)
- throw std::runtime_error("Failed to init RAMIN mapping");
+ throw std::runtime_error("Failed to init linear RAMIN mapping");
}
};