Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa449bd602c8871da48e6dbadfa0faaf4d33d32e
Commit:     fa449bd602c8871da48e6dbadfa0faaf4d33d32e
Parent:     d297c31fd101473983c17734a7e8a3752da1880f
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Wed Apr 25 16:01:51 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Apr 26 01:54:59 2007 -0700

    [OPENPROM]: Use pci_device_to_OF_node().
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/sbus/char/openprom.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index aec3b9f..fbfeb89 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -44,7 +44,6 @@
 #include <asm/openpromio.h>
 #ifdef CONFIG_PCI
 #include <linux/pci.h>
-#include <asm/pbm.h>
 #endif
 
 MODULE_AUTHOR("Thomas K. Dyas ([EMAIL PROTECTED]) and Eddie C. Dost  ([EMAIL 
PROTECTED])");
@@ -248,18 +247,17 @@ static int oprompci2node(void __user *argp, struct 
device_node *dp, struct openp
        if (bufsize >= 2*sizeof(int)) {
 #ifdef CONFIG_PCI
                struct pci_dev *pdev;
-               struct pcidev_cookie *pcp;
+               struct device_node *dp;
+
                pdev = pci_get_bus_and_slot (((int *) op->oprom_array)[0],
                                      ((int *) op->oprom_array)[1]);
 
-               pcp = pdev->sysdata;
-               if (pcp != NULL) {
-                       dp = pcp->prom_node;
-                       data->current_node = dp;
-                       *((int *)op->oprom_array) = dp->node;
-                       op->oprom_size = sizeof(int);
-                       err = copyout(argp, op, bufsize + sizeof(int));
-               }
+               dp = pci_device_to_OF_node(pdev);
+               data->current_node = dp;
+               *((int *)op->oprom_array) = dp->node;
+               op->oprom_size = sizeof(int);
+               err = copyout(argp, op, bufsize + sizeof(int));
+
                pci_dev_put(pdev);
 #endif
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to