diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-02-28 19:40:57 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 04:54:51 -0400 |
commit | 6f85a8597d1d0d8ceeec5a82881c6ddf5cfb45e5 (patch) | |
tree | 964fa86baf458668723d1235badadab05b21293b /drivers/net | |
parent | 457e1a8afbcf5deffa501f2e9829526c18ed55b5 (diff) |
[SUNHME]: Use pci_device_to_OF_node().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sunhme.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index bee5e5b309b7..bf0d4844f9fe 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -55,9 +55,6 @@ | |||
55 | 55 | ||
56 | #ifdef CONFIG_PCI | 56 | #ifdef CONFIG_PCI |
57 | #include <linux/pci.h> | 57 | #include <linux/pci.h> |
58 | #ifdef CONFIG_SPARC | ||
59 | #include <asm/pbm.h> | ||
60 | #endif | ||
61 | #endif | 58 | #endif |
62 | 59 | ||
63 | #include "sunhme.h" | 60 | #include "sunhme.h" |
@@ -2986,7 +2983,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, | |||
2986 | { | 2983 | { |
2987 | struct quattro *qp = NULL; | 2984 | struct quattro *qp = NULL; |
2988 | #ifdef CONFIG_SPARC | 2985 | #ifdef CONFIG_SPARC |
2989 | struct pcidev_cookie *pcp; | 2986 | struct device_node *dp; |
2990 | #endif | 2987 | #endif |
2991 | struct happy_meal *hp; | 2988 | struct happy_meal *hp; |
2992 | struct net_device *dev; | 2989 | struct net_device *dev; |
@@ -2998,13 +2995,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, | |||
2998 | 2995 | ||
2999 | /* Now make sure pci_dev cookie is there. */ | 2996 | /* Now make sure pci_dev cookie is there. */ |
3000 | #ifdef CONFIG_SPARC | 2997 | #ifdef CONFIG_SPARC |
3001 | pcp = pdev->sysdata; | 2998 | dp = pci_device_to_OF_node(pdev); |
3002 | if (pcp == NULL) { | 2999 | strcpy(prom_name, dp->name); |
3003 | printk(KERN_ERR "happymeal(PCI): Some PCI device info missing\n"); | ||
3004 | return -ENODEV; | ||
3005 | } | ||
3006 | |||
3007 | strcpy(prom_name, pcp->prom_node->name); | ||
3008 | #else | 3000 | #else |
3009 | if (is_quattro_p(pdev)) | 3001 | if (is_quattro_p(pdev)) |
3010 | strcpy(prom_name, "SUNW,qfe"); | 3002 | strcpy(prom_name, "SUNW,qfe"); |
@@ -3085,7 +3077,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, | |||
3085 | int len; | 3077 | int len; |
3086 | 3078 | ||
3087 | if (qfe_slot != -1 && | 3079 | if (qfe_slot != -1 && |
3088 | (addr = of_get_property(pcp->prom_node, | 3080 | (addr = of_get_property(dp, |
3089 | "local-mac-address", &len)) != NULL | 3081 | "local-mac-address", &len)) != NULL |
3090 | && len == 6) { | 3082 | && len == 6) { |
3091 | memcpy(dev->dev_addr, addr, 6); | 3083 | memcpy(dev->dev_addr, addr, 6); |
@@ -3105,7 +3097,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, | |||
3105 | hp->tcvregs = (hpreg_base + 0x7000UL); | 3097 | hp->tcvregs = (hpreg_base + 0x7000UL); |
3106 | 3098 | ||
3107 | #ifdef CONFIG_SPARC | 3099 | #ifdef CONFIG_SPARC |
3108 | hp->hm_revision = of_getintprop_default(pcp->prom_node, "hm-rev", 0xff); | 3100 | hp->hm_revision = of_getintprop_default(dp, "hm-rev", 0xff); |
3109 | if (hp->hm_revision == 0xff) { | 3101 | if (hp->hm_revision == 0xff) { |
3110 | unsigned char prev; | 3102 | unsigned char prev; |
3111 | 3103 | ||