aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/planb.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-04-29 22:38:01 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-29 22:38:01 -0400
commit49e1900d4cc2e7bcecb681fe60f0990bec2dcce8 (patch)
tree253801ebf57e0a23856a2c7be129c2c178f62fdf /drivers/media/video/planb.c
parent34f6d749c0a328817d5e36274e53121c1db734dc (diff)
parentb9099ff63c75216d6ca10bce5a1abcd9293c27e6 (diff)
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'drivers/media/video/planb.c')
-rw-r--r--drivers/media/video/planb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/planb.c b/drivers/media/video/planb.c
index e6e61df0d071..1455a8f4e930 100644
--- a/drivers/media/video/planb.c
+++ b/drivers/media/video/planb.c
@@ -2210,7 +2210,7 @@ static int find_planb(void)
2210 "membase 0x%x (base reg. 0x%x)\n", 2210 "membase 0x%x (base reg. 0x%x)\n",
2211 bus, PCI_SLOT(dev_fn), PCI_FUNC(dev_fn), old_base, confreg); 2211 bus, PCI_SLOT(dev_fn), PCI_FUNC(dev_fn), old_base, confreg);
2212 2212
2213 pdev = pci_find_slot (bus, dev_fn); 2213 pdev = pci_get_bus_and_slot(bus, dev_fn);
2214 if (!pdev) { 2214 if (!pdev) {
2215 printk(KERN_ERR "planb: cannot find slot\n"); 2215 printk(KERN_ERR "planb: cannot find slot\n");
2216 goto err_out; 2216 goto err_out;
@@ -2240,6 +2240,7 @@ static int find_planb(void)
2240 pb->planb_base = planb_regs; 2240 pb->planb_base = planb_regs;
2241 pb->planb_base_phys = (struct planb_registers *)new_base; 2241 pb->planb_base_phys = (struct planb_registers *)new_base;
2242 pb->irq = irq; 2242 pb->irq = irq;
2243 pb->dev = pdev;
2243 2244
2244 return planb_num; 2245 return planb_num;
2245 2246
@@ -2247,6 +2248,7 @@ err_out_disable:
2247 pci_disable_device(pdev); 2248 pci_disable_device(pdev);
2248err_out: 2249err_out:
2249 /* FIXME handle error */ /* comment moved from pci_find_slot, above */ 2250 /* FIXME handle error */ /* comment moved from pci_find_slot, above */
2251 pci_dev_put(pdev);
2250 return 0; 2252 return 0;
2251} 2253}
2252 2254
@@ -2274,6 +2276,8 @@ static void release_planb(void)
2274 printk(KERN_INFO "PlanB: unregistering with v4l\n"); 2276 printk(KERN_INFO "PlanB: unregistering with v4l\n");
2275 video_unregister_device(&pb->video_dev); 2277 video_unregister_device(&pb->video_dev);
2276 2278
2279 pci_dev_put(pb->dev);
2280
2277 /* note that iounmap() does nothing on the PPC right now */ 2281 /* note that iounmap() does nothing on the PPC right now */
2278 iounmap ((void *)pb->planb_base); 2282 iounmap ((void *)pb->planb_base);
2279 } 2283 }