aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 19:01:51 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 04:54:59 -0400
commitfa449bd602c8871da48e6dbadfa0faaf4d33d32e (patch)
tree450492d690f838af35a3071d95187d2c019ddb15 /drivers
parentd297c31fd101473983c17734a7e8a3752da1880f (diff)
[OPENPROM]: Use pci_device_to_OF_node().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sbus/char/openprom.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index aec3b9f991f6..fbfeb89a6f32 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -44,7 +44,6 @@
44#include <asm/openpromio.h> 44#include <asm/openpromio.h>
45#ifdef CONFIG_PCI 45#ifdef CONFIG_PCI
46#include <linux/pci.h> 46#include <linux/pci.h>
47#include <asm/pbm.h>
48#endif 47#endif
49 48
50MODULE_AUTHOR("Thomas K. Dyas (tdyas@noc.rutgers.edu) and Eddie C. Dost (ecd@skynet.be)"); 49MODULE_AUTHOR("Thomas K. Dyas (tdyas@noc.rutgers.edu) and Eddie C. Dost (ecd@skynet.be)");
@@ -248,18 +247,17 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
248 if (bufsize >= 2*sizeof(int)) { 247 if (bufsize >= 2*sizeof(int)) {
249#ifdef CONFIG_PCI 248#ifdef CONFIG_PCI
250 struct pci_dev *pdev; 249 struct pci_dev *pdev;
251 struct pcidev_cookie *pcp; 250 struct device_node *dp;
251
252 pdev = pci_get_bus_and_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 dp = pci_device_to_OF_node(pdev);
256 if (pcp != NULL) { 256 data->current_node = dp;
257 dp = pcp->prom_node; 257 *((int *)op->oprom_array) = dp->node;
258 data->current_node = dp; 258 op->oprom_size = sizeof(int);
259 *((int *)op->oprom_array) = dp->node; 259 err = copyout(argp, op, bufsize + sizeof(int));
260 op->oprom_size = sizeof(int); 260
261 err = copyout(argp, op, bufsize + sizeof(int));
262 }
263 pci_dev_put(pdev); 261 pci_dev_put(pdev);
264#endif 262#endif
265 } 263 }