summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/ichxrom.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-22 10:19:20 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-09-22 10:19:20 +0100
commitdd8e9ed6ed544e2b924429d29cd2a6b55590109b (patch)
tree0961c205e59591e7da65ce7504c919e7ee3e4351 /drivers/mtd/maps/ichxrom.c
parent668040fcd1e06fc3e68a92708cbdfa5a52c37d3c (diff)
[MTD] Switch to pci_get_device and do ref counting
Signed-off-by: Alan Cox <alan@redhat.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/maps/ichxrom.c')
-rw-r--r--drivers/mtd/maps/ichxrom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c
index db4b570d874..2bb3e63606e 100644
--- a/drivers/mtd/maps/ichxrom.c
+++ b/drivers/mtd/maps/ichxrom.c
@@ -61,6 +61,7 @@ static void ichxrom_cleanup(struct ichxrom_window *window)
/* Disable writes through the rom window */
pci_read_config_word(window->pdev, BIOS_CNTL, &word);
pci_write_config_word(window->pdev, BIOS_CNTL, word & ~1);
+ pci_dev_put(window->pdev);
/* Free all of the mtd devices */
list_for_each_entry_safe(map, scratch, &window->maps, list) {
@@ -355,7 +356,7 @@ static int __init init_ichxrom(void)
pdev = NULL;
for (id = ichxrom_pci_tbl; id->vendor; id++) {
- pdev = pci_find_device(id->vendor, id->device, NULL);
+ pdev = pci_get_device(id->vendor, id->device, NULL);
if (pdev) {
break;
}