diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-04-23 16:57:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 14:45:54 -0400 |
commit | 74ea1c7a7e7b5dfe961f3ed08365f9deb899b163 (patch) | |
tree | e11426598ef876352eb96d7131e4d27996b5b103 /drivers/media | |
parent | 8ca966d7fdfa44f5ffbc2aac6b65e5aa5482123b (diff) |
V4L/DVB (5552): Plan-b: Switch to refcounting PCI API
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/planb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/planb.c b/drivers/media/video/planb.c index 86d2884e16c6..fe184f93c016 100644 --- a/drivers/media/video/planb.c +++ b/drivers/media/video/planb.c | |||
@@ -2207,7 +2207,7 @@ static int find_planb(void) | |||
2207 | "membase 0x%x (base reg. 0x%x)\n", | 2207 | "membase 0x%x (base reg. 0x%x)\n", |
2208 | bus, PCI_SLOT(dev_fn), PCI_FUNC(dev_fn), old_base, confreg); | 2208 | bus, PCI_SLOT(dev_fn), PCI_FUNC(dev_fn), old_base, confreg); |
2209 | 2209 | ||
2210 | pdev = pci_find_slot (bus, dev_fn); | 2210 | pdev = pci_get_bus_and_slot(bus, dev_fn); |
2211 | if (!pdev) { | 2211 | if (!pdev) { |
2212 | printk(KERN_ERR "planb: cannot find slot\n"); | 2212 | printk(KERN_ERR "planb: cannot find slot\n"); |
2213 | goto err_out; | 2213 | goto err_out; |
@@ -2237,6 +2237,7 @@ static int find_planb(void) | |||
2237 | pb->planb_base = planb_regs; | 2237 | pb->planb_base = planb_regs; |
2238 | pb->planb_base_phys = (struct planb_registers *)new_base; | 2238 | pb->planb_base_phys = (struct planb_registers *)new_base; |
2239 | pb->irq = irq; | 2239 | pb->irq = irq; |
2240 | pb->dev = pdev; | ||
2240 | 2241 | ||
2241 | return planb_num; | 2242 | return planb_num; |
2242 | 2243 | ||
@@ -2244,6 +2245,7 @@ err_out_disable: | |||
2244 | pci_disable_device(pdev); | 2245 | pci_disable_device(pdev); |
2245 | err_out: | 2246 | err_out: |
2246 | /* FIXME handle error */ /* comment moved from pci_find_slot, above */ | 2247 | /* FIXME handle error */ /* comment moved from pci_find_slot, above */ |
2248 | pci_dev_put(pdev); | ||
2247 | return 0; | 2249 | return 0; |
2248 | } | 2250 | } |
2249 | 2251 | ||
@@ -2271,6 +2273,8 @@ static void release_planb(void) | |||
2271 | printk(KERN_INFO "PlanB: unregistering with v4l\n"); | 2273 | printk(KERN_INFO "PlanB: unregistering with v4l\n"); |
2272 | video_unregister_device(&pb->video_dev); | 2274 | video_unregister_device(&pb->video_dev); |
2273 | 2275 | ||
2276 | pci_dev_put(pb->dev); | ||
2277 | |||
2274 | /* note that iounmap() does nothing on the PPC right now */ | 2278 | /* note that iounmap() does nothing on the PPC right now */ |
2275 | iounmap ((void *)pb->planb_base); | 2279 | iounmap ((void *)pb->planb_base); |
2276 | } | 2280 | } |