diff options
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/esb2rom.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c index e1c781482bfa..a9d808a617c9 100644 --- a/drivers/mtd/maps/esb2rom.c +++ b/drivers/mtd/maps/esb2rom.c | |||
@@ -140,8 +140,8 @@ static void esb2rom_cleanup(struct esb2rom_window *window) | |||
140 | window->virt = NULL; | 140 | window->virt = NULL; |
141 | window->phys = 0; | 141 | window->phys = 0; |
142 | window->size = 0; | 142 | window->size = 0; |
143 | window->pdev = NULL; | ||
144 | } | 143 | } |
144 | pci_dev_put(window->pdev); | ||
145 | } | 145 | } |
146 | 146 | ||
147 | static int __devinit esb2rom_init_one(struct pci_dev *pdev, | 147 | static int __devinit esb2rom_init_one(struct pci_dev *pdev, |
@@ -164,7 +164,7 @@ static int __devinit esb2rom_init_one(struct pci_dev *pdev, | |||
164 | * Also you can page firmware hubs if an 8MiB window isn't enough | 164 | * Also you can page firmware hubs if an 8MiB window isn't enough |
165 | * but don't currently handle that case either. | 165 | * but don't currently handle that case either. |
166 | */ | 166 | */ |
167 | window->pdev = pdev; | 167 | window->pdev = pci_dev_get(pdev); |
168 | 168 | ||
169 | /* RLG: experiment 2. Force the window registers to the widest values */ | 169 | /* RLG: experiment 2. Force the window registers to the widest values */ |
170 | 170 | ||
@@ -418,7 +418,7 @@ static int __init init_esb2rom(void) | |||
418 | pdev = NULL; | 418 | pdev = NULL; |
419 | for (id = esb2rom_pci_tbl; id->vendor; id++) { | 419 | for (id = esb2rom_pci_tbl; id->vendor; id++) { |
420 | printk(KERN_DEBUG "device id = %x\n", id->device); | 420 | printk(KERN_DEBUG "device id = %x\n", id->device); |
421 | pdev = pci_find_device(id->vendor, id->device, NULL); | 421 | pdev = pci_get_device(id->vendor, id->device, NULL); |
422 | if (pdev) { | 422 | if (pdev) { |
423 | printk(KERN_DEBUG "matched device = %x\n", id->device); | 423 | printk(KERN_DEBUG "matched device = %x\n", id->device); |
424 | break; | 424 | break; |
@@ -427,6 +427,7 @@ static int __init init_esb2rom(void) | |||
427 | if (pdev) { | 427 | if (pdev) { |
428 | printk(KERN_DEBUG "matched device id %x\n", id->device); | 428 | printk(KERN_DEBUG "matched device id %x\n", id->device); |
429 | retVal = esb2rom_init_one(pdev, &esb2rom_pci_tbl[0]); | 429 | retVal = esb2rom_init_one(pdev, &esb2rom_pci_tbl[0]); |
430 | pci_dev_put(pdev); | ||
430 | printk(KERN_DEBUG "retVal = %d\n", retVal); | 431 | printk(KERN_DEBUG "retVal = %d\n", retVal); |
431 | return retVal; | 432 | return retVal; |
432 | } | 433 | } |