]> err.no Git - linux-2.6/blobdiff - drivers/mtd/maps/amd76xrom.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6] / drivers / mtd / maps / amd76xrom.c
index c350878d4592978ffece3fe1b1e97cb4caae5187..797caffb20b138b74eebe602878d0c617cb2253e 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/mtd/map.h>
 #include <linux/mtd/cfi.h>
 #include <linux/mtd/flashchip.h>
-#include <linux/config.h>
 #include <linux/pci.h>
 #include <linux/pci_ids.h>
 #include <linux/list.h>
@@ -58,6 +57,7 @@ static void amd76xrom_cleanup(struct amd76xrom_window *window)
                /* Disable writes through the rom window */
                pci_read_config_byte(window->pdev, 0x40, &byte);
                pci_write_config_byte(window->pdev, 0x40, byte & ~1);
+               pci_dev_put(window->pdev);
        }
 
        /* Free all of the mtd devices */
@@ -92,7 +92,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
        struct amd76xrom_map_info *map = NULL;
        unsigned long map_top;
 
-       /* Remember the pci dev I find the window in */
+       /* Remember the pci dev I find the window in - already have a ref */
        window->pdev = pdev;
 
        /* Assume the rom window is properly setup, and find it's size */
@@ -123,9 +123,10 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
                window->rsrc.parent = NULL;
                printk(KERN_ERR MOD_NAME
                        " %s(): Unable to register resource"
-                       " 0x%.08lx-0x%.08lx - kernel bug?\n",
+                       " 0x%.16llx-0x%.16llx - kernel bug?\n",
                        __func__,
-                       window->rsrc.start, window->rsrc.end);
+                       (unsigned long long)window->rsrc.start,
+                       (unsigned long long)window->rsrc.end);
        }
 
 #if 0
@@ -302,7 +303,7 @@ static int __init init_amd76xrom(void)
        struct pci_device_id *id;
        pdev = NULL;
        for(id = amd76xrom_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;
                }