diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:44 -0400 |
commit | 61c7a080a5a061c976988fd4b844dfb468dda255 (patch) | |
tree | 8cb492b73f2755c38a6164d770da34d5af6486a0 /drivers/atm | |
parent | d12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff) |
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.
(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/atm')
-rw-r--r-- | drivers/atm/fore200e.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index f7d6ebaa0418..593a03a376e4 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -789,7 +789,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e) | |||
789 | fore200e->bus->write(0x02, fore200e->regs.sba.isr); /* XXX hardwired interrupt level */ | 789 | fore200e->bus->write(0x02, fore200e->regs.sba.isr); /* XXX hardwired interrupt level */ |
790 | 790 | ||
791 | /* get the supported DVMA burst sizes */ | 791 | /* get the supported DVMA burst sizes */ |
792 | bursts = of_getintprop_default(op->node->parent, "burst-sizes", 0x00); | 792 | bursts = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0x00); |
793 | 793 | ||
794 | if (sbus_can_dma_64bit()) | 794 | if (sbus_can_dma_64bit()) |
795 | sbus_set_sbus64(&op->dev, bursts); | 795 | sbus_set_sbus64(&op->dev, bursts); |
@@ -820,18 +820,20 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_ | |||
820 | const u8 *prop; | 820 | const u8 *prop; |
821 | int len; | 821 | int len; |
822 | 822 | ||
823 | prop = of_get_property(op->node, "madaddrlo2", &len); | 823 | prop = of_get_property(op->dev.of_node, "madaddrlo2", &len); |
824 | if (!prop) | 824 | if (!prop) |
825 | return -ENODEV; | 825 | return -ENODEV; |
826 | memcpy(&prom->mac_addr[4], prop, 4); | 826 | memcpy(&prom->mac_addr[4], prop, 4); |
827 | 827 | ||
828 | prop = of_get_property(op->node, "madaddrhi4", &len); | 828 | prop = of_get_property(op->dev.of_node, "madaddrhi4", &len); |
829 | if (!prop) | 829 | if (!prop) |
830 | return -ENODEV; | 830 | return -ENODEV; |
831 | memcpy(&prom->mac_addr[2], prop, 4); | 831 | memcpy(&prom->mac_addr[2], prop, 4); |
832 | 832 | ||
833 | prom->serial_number = of_getintprop_default(op->node, "serialnumber", 0); | 833 | prom->serial_number = of_getintprop_default(op->dev.of_node, |
834 | prom->hw_revision = of_getintprop_default(op->node, "promversion", 0); | 834 | "serialnumber", 0); |
835 | prom->hw_revision = of_getintprop_default(op->dev.of_node, | ||
836 | "promversion", 0); | ||
835 | 837 | ||
836 | return 0; | 838 | return 0; |
837 | } | 839 | } |
@@ -841,10 +843,10 @@ static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page) | |||
841 | struct of_device *op = fore200e->bus_dev; | 843 | struct of_device *op = fore200e->bus_dev; |
842 | const struct linux_prom_registers *regs; | 844 | const struct linux_prom_registers *regs; |
843 | 845 | ||
844 | regs = of_get_property(op->node, "reg", NULL); | 846 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
845 | 847 | ||
846 | return sprintf(page, " SBUS slot/device:\t\t%d/'%s'\n", | 848 | return sprintf(page, " SBUS slot/device:\t\t%d/'%s'\n", |
847 | (regs ? regs->which_io : 0), op->node->name); | 849 | (regs ? regs->which_io : 0), op->dev.of_node->name); |
848 | } | 850 | } |
849 | #endif /* CONFIG_SBUS */ | 851 | #endif /* CONFIG_SBUS */ |
850 | 852 | ||