Skip to content

Commit

Permalink
[SPARC64] ebus: Convert to use pci_device_to_OF_node().
Browse files Browse the repository at this point in the history
Also, we don't need to store or use the PBM so kill that
from the linux_ebus.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 26, 2007
1 parent 9b1caaf commit 1327e9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 3 additions & 9 deletions arch/sparc64/kernel/ebus.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,9 @@ static struct pci_dev *find_next_ebus(struct pci_dev *start, int *is_rio_p)

void __init ebus_init(void)
{
struct pci_pbm_info *pbm;
struct linux_ebus_device *dev;
struct linux_ebus *ebus;
struct pci_dev *pdev;
struct pcidev_cookie *cookie;
struct device_node *dp;
int is_rio;
int num_ebus = 0;
Expand All @@ -453,8 +451,7 @@ void __init ebus_init(void)
return;
}

cookie = pdev->sysdata;
dp = cookie->prom_node;
dp = pci_device_to_OF_node(pdev);

ebus_chain = ebus = ebus_alloc(sizeof(struct linux_ebus));
ebus->next = NULL;
Expand All @@ -480,16 +477,14 @@ void __init ebus_init(void)
break;
}
ebus->is_rio = is_rio;
cookie = pdev->sysdata;
dp = cookie->prom_node;
dp = pci_device_to_OF_node(pdev);
continue;
}
printk("ebus%d:", num_ebus);

ebus->index = num_ebus;
ebus->prom_node = dp;
ebus->self = pdev;
ebus->parent = pbm = cookie->pbm;

ebus->ofdev.node = dp;
ebus->ofdev.dev.parent = &pdev->dev;
Expand Down Expand Up @@ -531,8 +526,7 @@ void __init ebus_init(void)
if (!pdev)
break;

cookie = pdev->sysdata;
dp = cookie->prom_node;
dp = pci_device_to_OF_node(pdev);

ebus->next = ebus_alloc(sizeof(struct linux_ebus));
ebus = ebus->next;
Expand Down
2 changes: 0 additions & 2 deletions include/asm-sparc64/ebus.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#ifndef __SPARC64_EBUS_H
#define __SPARC64_EBUS_H

#include <asm/pbm.h>
#include <asm/oplib.h>
#include <asm/prom.h>
#include <asm/of_device.h>
Expand Down Expand Up @@ -41,7 +40,6 @@ struct linux_ebus {
struct of_device ofdev;
struct linux_ebus *next;
struct linux_ebus_device *devices;
struct pci_pbm_info *parent;
struct pci_dev *self;
int index;
int is_rio;
Expand Down

0 comments on commit 1327e9b

Please sign in to comment.