diff options
author | Alan Cox <alan@redhat.com> | 2007-04-24 01:50:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-04-24 01:50:53 -0400 |
commit | 7e9f33461521180ef2c148c0b77eeb412d18ffae (patch) | |
tree | 004fdb857f30e7146caae45c691fecad232b2efd /drivers/sbus/char/openprom.c | |
parent | c445a31cd7f469d77acc37538ab43a99530968b8 (diff) |
[SPARC] openprom: Switch to ref counting PCI API
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char/openprom.c')
-rw-r--r-- | drivers/sbus/char/openprom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c index eec28c142a59..5041c9dfbe3b 100644 --- a/drivers/sbus/char/openprom.c +++ b/drivers/sbus/char/openprom.c | |||
@@ -249,7 +249,7 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp | |||
249 | #ifdef CONFIG_PCI | 249 | #ifdef CONFIG_PCI |
250 | struct pci_dev *pdev; | 250 | struct pci_dev *pdev; |
251 | struct pcidev_cookie *pcp; | 251 | struct pcidev_cookie *pcp; |
252 | pdev = pci_find_slot (((int *) op->oprom_array)[0], | 252 | pdev = pci_get_bus_and_slot (((int *) op->oprom_array)[0], |
253 | ((int *) op->oprom_array)[1]); | 253 | ((int *) op->oprom_array)[1]); |
254 | 254 | ||
255 | pcp = pdev->sysdata; | 255 | pcp = pdev->sysdata; |
@@ -260,6 +260,7 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp | |||
260 | op->oprom_size = sizeof(int); | 260 | op->oprom_size = sizeof(int); |
261 | err = copyout(argp, op, bufsize + sizeof(int)); | 261 | err = copyout(argp, op, bufsize + sizeof(int)); |
262 | } | 262 | } |
263 | pci_dev_put(pdev); | ||
263 | #endif | 264 | #endif |
264 | } | 265 | } |
265 | 266 | ||