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 /arch | |
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 'arch')
42 files changed, 157 insertions, 158 deletions
diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c index f6c521898ebf..90d2246e15c0 100644 --- a/arch/microblaze/kernel/of_device.c +++ b/arch/microblaze/kernel/of_device.c | |||
@@ -12,7 +12,7 @@ | |||
12 | void of_device_make_bus_id(struct of_device *dev) | 12 | void of_device_make_bus_id(struct of_device *dev) |
13 | { | 13 | { |
14 | static atomic_t bus_no_reg_magic; | 14 | static atomic_t bus_no_reg_magic; |
15 | struct device_node *node = dev->node; | 15 | struct device_node *node = dev->dev.of_node; |
16 | const u32 *reg; | 16 | const u32 *reg; |
17 | u64 addr; | 17 | u64 addr; |
18 | int magic; | 18 | int magic; |
@@ -76,17 +76,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
76 | 76 | ||
77 | ofdev = to_of_device(dev); | 77 | ofdev = to_of_device(dev); |
78 | 78 | ||
79 | if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name)) | 79 | if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name)) |
80 | return -ENOMEM; | 80 | return -ENOMEM; |
81 | 81 | ||
82 | if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type)) | 82 | if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type)) |
83 | return -ENOMEM; | 83 | return -ENOMEM; |
84 | 84 | ||
85 | /* Since the compatible field can contain pretty much anything | 85 | /* Since the compatible field can contain pretty much anything |
86 | * it's not really legal to split it out with commas. We split it | 86 | * it's not really legal to split it out with commas. We split it |
87 | * up using a number of environment variables instead. */ | 87 | * up using a number of environment variables instead. */ |
88 | 88 | ||
89 | compat = of_get_property(ofdev->node, "compatible", &cplen); | 89 | compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen); |
90 | while (compat && *compat && cplen > 0) { | 90 | while (compat && *compat && cplen > 0) { |
91 | if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) | 91 | if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) |
92 | return -ENOMEM; | 92 | return -ENOMEM; |
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index 0dc755286d38..46a1e105a6bd 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c | |||
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(of_platform_bus_probe); | |||
166 | 166 | ||
167 | static int of_dev_node_match(struct device *dev, void *data) | 167 | static int of_dev_node_match(struct device *dev, void *data) |
168 | { | 168 | { |
169 | return to_of_device(dev)->node == data; | 169 | return to_of_device(dev)->dev.of_node == data; |
170 | } | 170 | } |
171 | 171 | ||
172 | struct of_device *of_find_device_by_node(struct device_node *np) | 172 | struct of_device *of_find_device_by_node(struct device_node *np) |
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(of_find_device_by_node); | |||
184 | static int of_dev_phandle_match(struct device *dev, void *data) | 184 | static int of_dev_phandle_match(struct device *dev, void *data) |
185 | { | 185 | { |
186 | phandle *ph = data; | 186 | phandle *ph = data; |
187 | return to_of_device(dev)->node->phandle == *ph; | 187 | return to_of_device(dev)->dev.of_node->phandle == *ph; |
188 | } | 188 | } |
189 | 189 | ||
190 | struct of_device *of_find_device_by_phandle(phandle ph) | 190 | struct of_device *of_find_device_by_phandle(phandle ph) |
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h index a062c57696d0..19a661b4cb98 100644 --- a/arch/powerpc/include/asm/macio.h +++ b/arch/powerpc/include/asm/macio.h | |||
@@ -108,7 +108,7 @@ static inline void* macio_get_drvdata(struct macio_dev *dev) | |||
108 | 108 | ||
109 | static inline struct device_node *macio_get_of_node(struct macio_dev *mdev) | 109 | static inline struct device_node *macio_get_of_node(struct macio_dev *mdev) |
110 | { | 110 | { |
111 | return mdev->ofdev.node; | 111 | return mdev->ofdev.dev.of_node; |
112 | } | 112 | } |
113 | 113 | ||
114 | #ifdef CONFIG_PCI | 114 | #ifdef CONFIG_PCI |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 71cf280da184..a9f31631a293 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -140,14 +140,14 @@ static struct dma_map_ops ibmebus_dma_ops = { | |||
140 | 140 | ||
141 | static int ibmebus_match_path(struct device *dev, void *data) | 141 | static int ibmebus_match_path(struct device *dev, void *data) |
142 | { | 142 | { |
143 | struct device_node *dn = to_of_device(dev)->node; | 143 | struct device_node *dn = to_of_device(dev)->dev.of_node; |
144 | return (dn->full_name && | 144 | return (dn->full_name && |
145 | (strcasecmp((char *)data, dn->full_name) == 0)); | 145 | (strcasecmp((char *)data, dn->full_name) == 0)); |
146 | } | 146 | } |
147 | 147 | ||
148 | static int ibmebus_match_node(struct device *dev, void *data) | 148 | static int ibmebus_match_node(struct device *dev, void *data) |
149 | { | 149 | { |
150 | return to_of_device(dev)->node == data; | 150 | return to_of_device(dev)->dev.of_node == data; |
151 | } | 151 | } |
152 | 152 | ||
153 | static int ibmebus_create_device(struct device_node *dn) | 153 | static int ibmebus_create_device(struct device_node *dn) |
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 9577e6f4e3bf..285c8490c547 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c | |||
@@ -13,7 +13,7 @@ | |||
13 | static void of_device_make_bus_id(struct of_device *dev) | 13 | static void of_device_make_bus_id(struct of_device *dev) |
14 | { | 14 | { |
15 | static atomic_t bus_no_reg_magic; | 15 | static atomic_t bus_no_reg_magic; |
16 | struct device_node *node = dev->node; | 16 | struct device_node *node = dev->dev.of_node; |
17 | const u32 *reg; | 17 | const u32 *reg; |
18 | u64 addr; | 18 | u64 addr; |
19 | int magic; | 19 | int magic; |
@@ -96,17 +96,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
96 | 96 | ||
97 | ofdev = to_of_device(dev); | 97 | ofdev = to_of_device(dev); |
98 | 98 | ||
99 | if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name)) | 99 | if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name)) |
100 | return -ENOMEM; | 100 | return -ENOMEM; |
101 | 101 | ||
102 | if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type)) | 102 | if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type)) |
103 | return -ENOMEM; | 103 | return -ENOMEM; |
104 | 104 | ||
105 | /* Since the compatible field can contain pretty much anything | 105 | /* Since the compatible field can contain pretty much anything |
106 | * it's not really legal to split it out with commas. We split it | 106 | * it's not really legal to split it out with commas. We split it |
107 | * up using a number of environment variables instead. */ | 107 | * up using a number of environment variables instead. */ |
108 | 108 | ||
109 | compat = of_get_property(ofdev->node, "compatible", &cplen); | 109 | compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen); |
110 | while (compat && *compat && cplen > 0) { | 110 | while (compat && *compat && cplen > 0) { |
111 | if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) | 111 | if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) |
112 | return -ENOMEM; | 112 | return -ENOMEM; |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 6c1dfc3ff8bc..1c747c474415 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -195,7 +195,7 @@ EXPORT_SYMBOL(of_platform_bus_probe); | |||
195 | 195 | ||
196 | static int of_dev_node_match(struct device *dev, void *data) | 196 | static int of_dev_node_match(struct device *dev, void *data) |
197 | { | 197 | { |
198 | return to_of_device(dev)->node == data; | 198 | return to_of_device(dev)->dev.of_node == data; |
199 | } | 199 | } |
200 | 200 | ||
201 | struct of_device *of_find_device_by_node(struct device_node *np) | 201 | struct of_device *of_find_device_by_node(struct device_node *np) |
@@ -213,7 +213,7 @@ EXPORT_SYMBOL(of_find_device_by_node); | |||
213 | static int of_dev_phandle_match(struct device *dev, void *data) | 213 | static int of_dev_phandle_match(struct device *dev, void *data) |
214 | { | 214 | { |
215 | phandle *ph = data; | 215 | phandle *ph = data; |
216 | return to_of_device(dev)->node->phandle == *ph; | 216 | return to_of_device(dev)->dev.of_node->phandle == *ph; |
217 | } | 217 | } |
218 | 218 | ||
219 | struct of_device *of_find_device_by_phandle(phandle ph) | 219 | struct of_device *of_find_device_by_phandle(phandle ph) |
@@ -246,10 +246,10 @@ static int __devinit of_pci_phb_probe(struct of_device *dev, | |||
246 | if (ppc_md.pci_setup_phb == NULL) | 246 | if (ppc_md.pci_setup_phb == NULL) |
247 | return -ENODEV; | 247 | return -ENODEV; |
248 | 248 | ||
249 | printk(KERN_INFO "Setting up PCI bus %s\n", dev->node->full_name); | 249 | pr_info("Setting up PCI bus %s\n", dev->dev.of_node->full_name); |
250 | 250 | ||
251 | /* Alloc and setup PHB data structure */ | 251 | /* Alloc and setup PHB data structure */ |
252 | phb = pcibios_alloc_controller(dev->node); | 252 | phb = pcibios_alloc_controller(dev->dev.of_node); |
253 | if (!phb) | 253 | if (!phb) |
254 | return -ENODEV; | 254 | return -ENODEV; |
255 | 255 | ||
@@ -263,19 +263,19 @@ static int __devinit of_pci_phb_probe(struct of_device *dev, | |||
263 | } | 263 | } |
264 | 264 | ||
265 | /* Process "ranges" property */ | 265 | /* Process "ranges" property */ |
266 | pci_process_bridge_OF_ranges(phb, dev->node, 0); | 266 | pci_process_bridge_OF_ranges(phb, dev->dev.of_node, 0); |
267 | 267 | ||
268 | /* Init pci_dn data structures */ | 268 | /* Init pci_dn data structures */ |
269 | pci_devs_phb_init_dynamic(phb); | 269 | pci_devs_phb_init_dynamic(phb); |
270 | 270 | ||
271 | /* Register devices with EEH */ | 271 | /* Register devices with EEH */ |
272 | #ifdef CONFIG_EEH | 272 | #ifdef CONFIG_EEH |
273 | if (dev->node->child) | 273 | if (dev->dev.of_node->child) |
274 | eeh_add_device_tree_early(dev->node); | 274 | eeh_add_device_tree_early(dev->dev.of_node); |
275 | #endif /* CONFIG_EEH */ | 275 | #endif /* CONFIG_EEH */ |
276 | 276 | ||
277 | /* Scan the bus */ | 277 | /* Scan the bus */ |
278 | pcibios_scan_phb(phb, dev->node); | 278 | pcibios_scan_phb(phb, dev->dev.of_node); |
279 | if (phb->bus == NULL) | 279 | if (phb->bus == NULL) |
280 | return -ENXIO; | 280 | return -ENXIO; |
281 | 281 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c index fda7c2a18282..576669fc4fbf 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c | |||
@@ -168,7 +168,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev, | |||
168 | ofchip->gc.get = mpc52xx_wkup_gpio_get; | 168 | ofchip->gc.get = mpc52xx_wkup_gpio_get; |
169 | ofchip->gc.set = mpc52xx_wkup_gpio_set; | 169 | ofchip->gc.set = mpc52xx_wkup_gpio_set; |
170 | 170 | ||
171 | ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip); | 171 | ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip); |
172 | if (ret) | 172 | if (ret) |
173 | return ret; | 173 | return ret; |
174 | 174 | ||
@@ -329,7 +329,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev, | |||
329 | ofchip->gc.get = mpc52xx_simple_gpio_get; | 329 | ofchip->gc.get = mpc52xx_simple_gpio_get; |
330 | ofchip->gc.set = mpc52xx_simple_gpio_set; | 330 | ofchip->gc.set = mpc52xx_simple_gpio_set; |
331 | 331 | ||
332 | ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip); | 332 | ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip); |
333 | if (ret) | 333 | if (ret) |
334 | return ret; | 334 | return ret; |
335 | 335 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index a60ee39d3b78..42c507f9c35b 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
@@ -734,8 +734,8 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev, | |||
734 | 734 | ||
735 | spin_lock_init(&gpt->lock); | 735 | spin_lock_init(&gpt->lock); |
736 | gpt->dev = &ofdev->dev; | 736 | gpt->dev = &ofdev->dev; |
737 | gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->node); | 737 | gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node); |
738 | gpt->regs = of_iomap(ofdev->node, 0); | 738 | gpt->regs = of_iomap(ofdev->dev.of_node, 0); |
739 | if (!gpt->regs) { | 739 | if (!gpt->regs) { |
740 | kfree(gpt); | 740 | kfree(gpt); |
741 | return -ENOMEM; | 741 | return -ENOMEM; |
@@ -743,21 +743,21 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev, | |||
743 | 743 | ||
744 | dev_set_drvdata(&ofdev->dev, gpt); | 744 | dev_set_drvdata(&ofdev->dev, gpt); |
745 | 745 | ||
746 | mpc52xx_gpt_gpio_setup(gpt, ofdev->node); | 746 | mpc52xx_gpt_gpio_setup(gpt, ofdev->dev.of_node); |
747 | mpc52xx_gpt_irq_setup(gpt, ofdev->node); | 747 | mpc52xx_gpt_irq_setup(gpt, ofdev->dev.of_node); |
748 | 748 | ||
749 | mutex_lock(&mpc52xx_gpt_list_mutex); | 749 | mutex_lock(&mpc52xx_gpt_list_mutex); |
750 | list_add(&gpt->list, &mpc52xx_gpt_list); | 750 | list_add(&gpt->list, &mpc52xx_gpt_list); |
751 | mutex_unlock(&mpc52xx_gpt_list_mutex); | 751 | mutex_unlock(&mpc52xx_gpt_list_mutex); |
752 | 752 | ||
753 | /* check if this device could be a watchdog */ | 753 | /* check if this device could be a watchdog */ |
754 | if (of_get_property(ofdev->node, "fsl,has-wdt", NULL) || | 754 | if (of_get_property(ofdev->dev.of_node, "fsl,has-wdt", NULL) || |
755 | of_get_property(ofdev->node, "has-wdt", NULL)) { | 755 | of_get_property(ofdev->dev.of_node, "has-wdt", NULL)) { |
756 | const u32 *on_boot_wdt; | 756 | const u32 *on_boot_wdt; |
757 | 757 | ||
758 | gpt->wdt_mode = MPC52xx_GPT_CAN_WDT; | 758 | gpt->wdt_mode = MPC52xx_GPT_CAN_WDT; |
759 | on_boot_wdt = of_get_property(ofdev->node, "fsl,wdt-on-boot", | 759 | on_boot_wdt = of_get_property(ofdev->dev.of_node, |
760 | NULL); | 760 | "fsl,wdt-on-boot", NULL); |
761 | if (on_boot_wdt) { | 761 | if (on_boot_wdt) { |
762 | dev_info(gpt->dev, "used as watchdog\n"); | 762 | dev_info(gpt->dev, "used as watchdog\n"); |
763 | gpt->wdt_mode |= MPC52xx_GPT_IS_WDT; | 763 | gpt->wdt_mode |= MPC52xx_GPT_IS_WDT; |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index d4f8be307cd5..17b99ba7a8cc 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
@@ -445,14 +445,14 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match) | |||
445 | if (lpbfifo.dev != NULL) | 445 | if (lpbfifo.dev != NULL) |
446 | return -ENOSPC; | 446 | return -ENOSPC; |
447 | 447 | ||
448 | lpbfifo.irq = irq_of_parse_and_map(op->node, 0); | 448 | lpbfifo.irq = irq_of_parse_and_map(op->dev.of_node, 0); |
449 | if (!lpbfifo.irq) | 449 | if (!lpbfifo.irq) |
450 | return -ENODEV; | 450 | return -ENODEV; |
451 | 451 | ||
452 | if (of_address_to_resource(op->node, 0, &res)) | 452 | if (of_address_to_resource(op->dev.of_node, 0, &res)) |
453 | return -ENODEV; | 453 | return -ENODEV; |
454 | lpbfifo.regs_phys = res.start; | 454 | lpbfifo.regs_phys = res.start; |
455 | lpbfifo.regs = of_iomap(op->node, 0); | 455 | lpbfifo.regs = of_iomap(op->dev.of_node, 0); |
456 | if (!lpbfifo.regs) | 456 | if (!lpbfifo.regs) |
457 | return -ENOMEM; | 457 | return -ENOMEM; |
458 | 458 | ||
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index f21555d3395a..0176ae8249d5 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -119,12 +119,12 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev, | |||
119 | struct device_node *node; | 119 | struct device_node *node; |
120 | int ret; | 120 | int ret; |
121 | 121 | ||
122 | node = of_get_parent(ofdev->node); | 122 | node = of_get_parent(ofdev->dev.of_node); |
123 | of_node_put(node); | 123 | of_node_put(node); |
124 | if (node != ep8248e_bcsr_node) | 124 | if (node != ep8248e_bcsr_node) |
125 | return -ENODEV; | 125 | return -ENODEV; |
126 | 126 | ||
127 | ret = of_address_to_resource(ofdev->node, 0, &res); | 127 | ret = of_address_to_resource(ofdev->dev.of_node, 0, &res); |
128 | if (ret) | 128 | if (ret) |
129 | return ret; | 129 | return ret; |
130 | 130 | ||
@@ -142,7 +142,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev, | |||
142 | bus->parent = &ofdev->dev; | 142 | bus->parent = &ofdev->dev; |
143 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); | 143 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); |
144 | 144 | ||
145 | ret = of_mdiobus_register(bus, ofdev->node); | 145 | ret = of_mdiobus_register(bus, ofdev->dev.of_node); |
146 | if (ret) | 146 | if (ret) |
147 | goto err_free_irq; | 147 | goto err_free_irq; |
148 | 148 | ||
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c index 43805348b81e..aa0b764b1cc4 100644 --- a/arch/powerpc/platforms/83xx/suspend.c +++ b/arch/powerpc/platforms/83xx/suspend.c | |||
@@ -321,7 +321,7 @@ static struct platform_suspend_ops mpc83xx_suspend_ops = { | |||
321 | static int pmc_probe(struct of_device *ofdev, | 321 | static int pmc_probe(struct of_device *ofdev, |
322 | const struct of_device_id *match) | 322 | const struct of_device_id *match) |
323 | { | 323 | { |
324 | struct device_node *np = ofdev->node; | 324 | struct device_node *np = ofdev->dev.of_node; |
325 | struct resource res; | 325 | struct resource res; |
326 | struct pmc_type *type = match->data; | 326 | struct pmc_type *type = match->data; |
327 | int ret = 0; | 327 | int ret = 0; |
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 8efe48192f3f..177a4f1369b4 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -345,7 +345,7 @@ static int axon_msi_shutdown(struct of_device *device) | |||
345 | static int axon_msi_probe(struct of_device *device, | 345 | static int axon_msi_probe(struct of_device *device, |
346 | const struct of_device_id *device_id) | 346 | const struct of_device_id *device_id) |
347 | { | 347 | { |
348 | struct device_node *dn = device->node; | 348 | struct device_node *dn = device->dev.of_node; |
349 | struct axon_msic *msic; | 349 | struct axon_msic *msic; |
350 | unsigned int virq; | 350 | unsigned int virq; |
351 | int dcr_base, dcr_len; | 351 | int dcr_base, dcr_len; |
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index 0f881f64583e..c44e1b3b91db 100644 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c | |||
@@ -220,7 +220,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev, | |||
220 | const struct of_device_id *match) | 220 | const struct of_device_id *match) |
221 | { | 221 | { |
222 | struct device *dev = &ofdev->dev; | 222 | struct device *dev = &ofdev->dev; |
223 | struct device_node *np = ofdev->node; | 223 | struct device_node *np = ofdev->dev.of_node; |
224 | struct mii_bus *new_bus; | 224 | struct mii_bus *new_bus; |
225 | struct gpio_priv *priv; | 225 | struct gpio_priv *priv; |
226 | const unsigned int *prop; | 226 | const unsigned int *prop; |
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 88f4ae787832..88b21fccf0c9 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -185,7 +185,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id) | |||
185 | axon_ram_bank_id++; | 185 | axon_ram_bank_id++; |
186 | 186 | ||
187 | dev_info(&device->dev, "Found memory controller on %s\n", | 187 | dev_info(&device->dev, "Found memory controller on %s\n", |
188 | device->node->full_name); | 188 | device->dev.of_node->full_name); |
189 | 189 | ||
190 | bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL); | 190 | bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL); |
191 | if (bank == NULL) { | 191 | if (bank == NULL) { |
@@ -198,7 +198,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id) | |||
198 | 198 | ||
199 | bank->device = device; | 199 | bank->device = device; |
200 | 200 | ||
201 | if (of_address_to_resource(device->node, 0, &resource) != 0) { | 201 | if (of_address_to_resource(device->dev.of_node, 0, &resource) != 0) { |
202 | dev_err(&device->dev, "Cannot access device tree\n"); | 202 | dev_err(&device->dev, "Cannot access device tree\n"); |
203 | rc = -EFAULT; | 203 | rc = -EFAULT; |
204 | goto failed; | 204 | goto failed; |
@@ -253,7 +253,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id) | |||
253 | blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE); | 253 | blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE); |
254 | add_disk(bank->disk); | 254 | add_disk(bank->disk); |
255 | 255 | ||
256 | bank->irq_id = irq_of_parse_and_map(device->node, 0); | 256 | bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0); |
257 | if (bank->irq_id == NO_IRQ) { | 257 | if (bank->irq_id == NO_IRQ) { |
258 | dev_err(&device->dev, "Cannot access ECC interrupt ID\n"); | 258 | dev_err(&device->dev, "Cannot access ECC interrupt ID\n"); |
259 | rc = -EFAULT; | 259 | rc = -EFAULT; |
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c index 378ebd9aac18..d32d5389b67a 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.c +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c | |||
@@ -377,7 +377,7 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match) | |||
377 | printk(KERN_INFO "DMA: MPC52xx BestComm driver\n"); | 377 | printk(KERN_INFO "DMA: MPC52xx BestComm driver\n"); |
378 | 378 | ||
379 | /* Get the bestcomm node */ | 379 | /* Get the bestcomm node */ |
380 | of_node_get(op->node); | 380 | of_node_get(op->dev.of_node); |
381 | 381 | ||
382 | /* Prepare SRAM */ | 382 | /* Prepare SRAM */ |
383 | ofn_sram = of_find_matching_node(NULL, mpc52xx_sram_ids); | 383 | ofn_sram = of_find_matching_node(NULL, mpc52xx_sram_ids); |
@@ -406,10 +406,10 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match) | |||
406 | } | 406 | } |
407 | 407 | ||
408 | /* Save the node */ | 408 | /* Save the node */ |
409 | bcom_eng->ofnode = op->node; | 409 | bcom_eng->ofnode = op->dev.of_node; |
410 | 410 | ||
411 | /* Get, reserve & map io */ | 411 | /* Get, reserve & map io */ |
412 | if (of_address_to_resource(op->node, 0, &res_bcom)) { | 412 | if (of_address_to_resource(op->dev.of_node, 0, &res_bcom)) { |
413 | printk(KERN_ERR DRIVER_NAME ": " | 413 | printk(KERN_ERR DRIVER_NAME ": " |
414 | "Can't get resource\n"); | 414 | "Can't get resource\n"); |
415 | rv = -EINVAL; | 415 | rv = -EINVAL; |
@@ -453,7 +453,7 @@ error_sramclean: | |||
453 | kfree(bcom_eng); | 453 | kfree(bcom_eng); |
454 | bcom_sram_cleanup(); | 454 | bcom_sram_cleanup(); |
455 | error_ofput: | 455 | error_ofput: |
456 | of_node_put(op->node); | 456 | of_node_put(op->dev.of_node); |
457 | 457 | ||
458 | printk(KERN_ERR "DMA: MPC52xx BestComm init failed !\n"); | 458 | printk(KERN_ERR "DMA: MPC52xx BestComm init failed !\n"); |
459 | 459 | ||
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 3482e3fd89c0..569dae8ea1ce 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -249,7 +249,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev, | |||
249 | goto error_out; | 249 | goto error_out; |
250 | } | 250 | } |
251 | 251 | ||
252 | msi->irqhost = irq_alloc_host(dev->node, IRQ_HOST_MAP_LINEAR, | 252 | msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR, |
253 | NR_MSI_IRQS, &fsl_msi_host_ops, 0); | 253 | NR_MSI_IRQS, &fsl_msi_host_ops, 0); |
254 | 254 | ||
255 | if (msi->irqhost == NULL) { | 255 | if (msi->irqhost == NULL) { |
@@ -259,10 +259,10 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev, | |||
259 | } | 259 | } |
260 | 260 | ||
261 | /* Get the MSI reg base */ | 261 | /* Get the MSI reg base */ |
262 | err = of_address_to_resource(dev->node, 0, &res); | 262 | err = of_address_to_resource(dev->dev.of_node, 0, &res); |
263 | if (err) { | 263 | if (err) { |
264 | dev_err(&dev->dev, "%s resource error!\n", | 264 | dev_err(&dev->dev, "%s resource error!\n", |
265 | dev->node->full_name); | 265 | dev->dev.of_node->full_name); |
266 | goto error_out; | 266 | goto error_out; |
267 | } | 267 | } |
268 | 268 | ||
@@ -285,16 +285,16 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev, | |||
285 | goto error_out; | 285 | goto error_out; |
286 | } | 286 | } |
287 | 287 | ||
288 | p = of_get_property(dev->node, "interrupts", &count); | 288 | p = of_get_property(dev->dev.of_node, "interrupts", &count); |
289 | if (!p) { | 289 | if (!p) { |
290 | dev_err(&dev->dev, "no interrupts property found on %s\n", | 290 | dev_err(&dev->dev, "no interrupts property found on %s\n", |
291 | dev->node->full_name); | 291 | dev->dev.of_node->full_name); |
292 | err = -ENODEV; | 292 | err = -ENODEV; |
293 | goto error_out; | 293 | goto error_out; |
294 | } | 294 | } |
295 | if (count % 8 != 0) { | 295 | if (count % 8 != 0) { |
296 | dev_err(&dev->dev, "Malformed interrupts property on %s\n", | 296 | dev_err(&dev->dev, "Malformed interrupts property on %s\n", |
297 | dev->node->full_name); | 297 | dev->dev.of_node->full_name); |
298 | err = -EINVAL; | 298 | err = -EINVAL; |
299 | goto error_out; | 299 | goto error_out; |
300 | } | 300 | } |
@@ -303,7 +303,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev, | |||
303 | for (i = 0; i < count / 2; i++) { | 303 | for (i = 0; i < count / 2; i++) { |
304 | if (i > NR_MSI_REG) | 304 | if (i > NR_MSI_REG) |
305 | break; | 305 | break; |
306 | virt_msir = irq_of_parse_and_map(dev->node, i); | 306 | virt_msir = irq_of_parse_and_map(dev->dev.of_node, i); |
307 | if (virt_msir != NO_IRQ) { | 307 | if (virt_msir != NO_IRQ) { |
308 | set_irq_data(virt_msir, (void *)i); | 308 | set_irq_data(virt_msir, (void *)i); |
309 | set_irq_chained_handler(virt_msir, fsl_msi_cascade); | 309 | set_irq_chained_handler(virt_msir, fsl_msi_cascade); |
diff --git a/arch/powerpc/sysdev/fsl_pmc.c b/arch/powerpc/sysdev/fsl_pmc.c index a7635a993dca..2ebe817ca72f 100644 --- a/arch/powerpc/sysdev/fsl_pmc.c +++ b/arch/powerpc/sysdev/fsl_pmc.c | |||
@@ -60,7 +60,7 @@ static struct platform_suspend_ops pmc_suspend_ops = { | |||
60 | 60 | ||
61 | static int pmc_probe(struct of_device *ofdev, const struct of_device_id *id) | 61 | static int pmc_probe(struct of_device *ofdev, const struct of_device_id *id) |
62 | { | 62 | { |
63 | pmc_regs = of_iomap(ofdev->node, 0); | 63 | pmc_regs = of_iomap(ofdev->dev.of_node, 0); |
64 | if (!pmc_regs) | 64 | if (!pmc_regs) |
65 | return -ENOMEM; | 65 | return -ENOMEM; |
66 | 66 | ||
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 71fba88f50db..a98d51639243 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1015,41 +1015,41 @@ int fsl_rio_setup(struct of_device *dev) | |||
1015 | u64 law_start, law_size; | 1015 | u64 law_start, law_size; |
1016 | int paw, aw, sw; | 1016 | int paw, aw, sw; |
1017 | 1017 | ||
1018 | if (!dev->node) { | 1018 | if (!dev->dev.of_node) { |
1019 | dev_err(&dev->dev, "Device OF-Node is NULL"); | 1019 | dev_err(&dev->dev, "Device OF-Node is NULL"); |
1020 | return -EFAULT; | 1020 | return -EFAULT; |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | rc = of_address_to_resource(dev->node, 0, ®s); | 1023 | rc = of_address_to_resource(dev->dev.of_node, 0, ®s); |
1024 | if (rc) { | 1024 | if (rc) { |
1025 | dev_err(&dev->dev, "Can't get %s property 'reg'\n", | 1025 | dev_err(&dev->dev, "Can't get %s property 'reg'\n", |
1026 | dev->node->full_name); | 1026 | dev->dev.of_node->full_name); |
1027 | return -EFAULT; | 1027 | return -EFAULT; |
1028 | } | 1028 | } |
1029 | dev_info(&dev->dev, "Of-device full name %s\n", dev->node->full_name); | 1029 | dev_info(&dev->dev, "Of-device full name %s\n", dev->dev.of_node->full_name); |
1030 | dev_info(&dev->dev, "Regs: %pR\n", ®s); | 1030 | dev_info(&dev->dev, "Regs: %pR\n", ®s); |
1031 | 1031 | ||
1032 | dt_range = of_get_property(dev->node, "ranges", &rlen); | 1032 | dt_range = of_get_property(dev->dev.of_node, "ranges", &rlen); |
1033 | if (!dt_range) { | 1033 | if (!dt_range) { |
1034 | dev_err(&dev->dev, "Can't get %s property 'ranges'\n", | 1034 | dev_err(&dev->dev, "Can't get %s property 'ranges'\n", |
1035 | dev->node->full_name); | 1035 | dev->dev.of_node->full_name); |
1036 | return -EFAULT; | 1036 | return -EFAULT; |
1037 | } | 1037 | } |
1038 | 1038 | ||
1039 | /* Get node address wide */ | 1039 | /* Get node address wide */ |
1040 | cell = of_get_property(dev->node, "#address-cells", NULL); | 1040 | cell = of_get_property(dev->dev.of_node, "#address-cells", NULL); |
1041 | if (cell) | 1041 | if (cell) |
1042 | aw = *cell; | 1042 | aw = *cell; |
1043 | else | 1043 | else |
1044 | aw = of_n_addr_cells(dev->node); | 1044 | aw = of_n_addr_cells(dev->dev.of_node); |
1045 | /* Get node size wide */ | 1045 | /* Get node size wide */ |
1046 | cell = of_get_property(dev->node, "#size-cells", NULL); | 1046 | cell = of_get_property(dev->dev.of_node, "#size-cells", NULL); |
1047 | if (cell) | 1047 | if (cell) |
1048 | sw = *cell; | 1048 | sw = *cell; |
1049 | else | 1049 | else |
1050 | sw = of_n_size_cells(dev->node); | 1050 | sw = of_n_size_cells(dev->dev.of_node); |
1051 | /* Get parent address wide wide */ | 1051 | /* Get parent address wide wide */ |
1052 | paw = of_n_addr_cells(dev->node); | 1052 | paw = of_n_addr_cells(dev->dev.of_node); |
1053 | 1053 | ||
1054 | law_start = of_read_number(dt_range + aw, paw); | 1054 | law_start = of_read_number(dt_range + aw, paw); |
1055 | law_size = of_read_number(dt_range + aw + paw, sw); | 1055 | law_size = of_read_number(dt_range + aw + paw, sw); |
@@ -1089,9 +1089,9 @@ int fsl_rio_setup(struct of_device *dev) | |||
1089 | port->iores.flags = IORESOURCE_MEM; | 1089 | port->iores.flags = IORESOURCE_MEM; |
1090 | port->iores.name = "rio_io_win"; | 1090 | port->iores.name = "rio_io_win"; |
1091 | 1091 | ||
1092 | priv->bellirq = irq_of_parse_and_map(dev->node, 2); | 1092 | priv->bellirq = irq_of_parse_and_map(dev->dev.of_node, 2); |
1093 | priv->txirq = irq_of_parse_and_map(dev->node, 3); | 1093 | priv->txirq = irq_of_parse_and_map(dev->dev.of_node, 3); |
1094 | priv->rxirq = irq_of_parse_and_map(dev->node, 4); | 1094 | priv->rxirq = irq_of_parse_and_map(dev->dev.of_node, 4); |
1095 | dev_info(&dev->dev, "bellirq: %d, txirq: %d, rxirq %d\n", priv->bellirq, | 1095 | dev_info(&dev->dev, "bellirq: %d, txirq: %d, rxirq %d\n", priv->bellirq, |
1096 | priv->txirq, priv->rxirq); | 1096 | priv->txirq, priv->rxirq); |
1097 | 1097 | ||
@@ -1195,7 +1195,7 @@ static int __devinit fsl_of_rio_rpn_probe(struct of_device *dev, | |||
1195 | { | 1195 | { |
1196 | int rc; | 1196 | int rc; |
1197 | printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", | 1197 | printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", |
1198 | dev->node->full_name); | 1198 | dev->dev.of_node->full_name); |
1199 | 1199 | ||
1200 | rc = fsl_rio_setup(dev); | 1200 | rc = fsl_rio_setup(dev); |
1201 | if (rc) | 1201 | if (rc) |
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c index 652652db4ce2..ff758bff1b7a 100644 --- a/arch/powerpc/sysdev/pmi.c +++ b/arch/powerpc/sysdev/pmi.c | |||
@@ -124,7 +124,7 @@ static void pmi_notify_handlers(struct work_struct *work) | |||
124 | static int pmi_of_probe(struct of_device *dev, | 124 | static int pmi_of_probe(struct of_device *dev, |
125 | const struct of_device_id *match) | 125 | const struct of_device_id *match) |
126 | { | 126 | { |
127 | struct device_node *np = dev->node; | 127 | struct device_node *np = dev->dev.of_node; |
128 | int rc; | 128 | int rc; |
129 | 129 | ||
130 | if (data) { | 130 | if (data) { |
diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h index b83e44729655..e834880be204 100644 --- a/arch/sparc/include/asm/fb.h +++ b/arch/sparc/include/asm/fb.h | |||
@@ -18,7 +18,7 @@ static inline int fb_is_primary_device(struct fb_info *info) | |||
18 | struct device *dev = info->device; | 18 | struct device *dev = info->device; |
19 | struct device_node *node; | 19 | struct device_node *node; |
20 | 20 | ||
21 | node = dev->archdata.prom_node; | 21 | node = dev->of_node; |
22 | if (node && | 22 | if (node && |
23 | node == of_console_device) | 23 | node == of_console_device) |
24 | return 1; | 24 | return 1; |
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h index 36439d67ad71..8fac3ab22f36 100644 --- a/arch/sparc/include/asm/floppy_64.h +++ b/arch/sparc/include/asm/floppy_64.h | |||
@@ -589,7 +589,7 @@ static unsigned long __init sun_floppy_init(void) | |||
589 | if (!op) | 589 | if (!op) |
590 | return 0; | 590 | return 0; |
591 | 591 | ||
592 | state_prop = of_get_property(op->node, "status", NULL); | 592 | state_prop = of_get_property(op->dev.of_node, "status", NULL); |
593 | if (state_prop && !strncmp(state_prop, "disabled", 8)) | 593 | if (state_prop && !strncmp(state_prop, "disabled", 8)) |
594 | return 0; | 594 | return 0; |
595 | 595 | ||
@@ -716,7 +716,7 @@ static unsigned long __init sun_floppy_init(void) | |||
716 | 716 | ||
717 | return sun_floppy_types[0]; | 717 | return sun_floppy_types[0]; |
718 | } | 718 | } |
719 | prop = of_get_property(op->node, "status", NULL); | 719 | prop = of_get_property(op->dev.of_node, "status", NULL); |
720 | if (prop && !strncmp(state, "disabled", 8)) | 720 | if (prop && !strncmp(state, "disabled", 8)) |
721 | return 0; | 721 | return 0; |
722 | 722 | ||
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index ff9ead640c4a..1bb6a41b00f2 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id | |||
113 | struct parport *p; | 113 | struct parport *p; |
114 | int slot, err; | 114 | int slot, err; |
115 | 115 | ||
116 | parent = op->node->parent; | 116 | parent = op->dev.of_node->parent; |
117 | if (!strcmp(parent->name, "dma")) { | 117 | if (!strcmp(parent->name, "dma")) { |
118 | p = parport_pc_probe_port(base, base + 0x400, | 118 | p = parport_pc_probe_port(base, base + 0x400, |
119 | op->irqs[0], PARPORT_DMA_NOFIFO, | 119 | op->irqs[0], PARPORT_DMA_NOFIFO, |
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 9f52db2d441c..bd8421a26856 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(of, auxio_match); | |||
104 | 104 | ||
105 | static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match) | 105 | static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match) |
106 | { | 106 | { |
107 | struct device_node *dp = dev->node; | 107 | struct device_node *dp = dev->dev.of_node; |
108 | unsigned long size; | 108 | unsigned long size; |
109 | 109 | ||
110 | if (!strcmp(dp->parent->name, "ebus")) { | 110 | if (!strcmp(dp->parent->name, "ebus")) { |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 415c86d5a8da..d533f3d5d484 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -168,7 +168,7 @@ static int __devinit fhc_probe(struct of_device *op, | |||
168 | goto out; | 168 | goto out; |
169 | } | 169 | } |
170 | 170 | ||
171 | if (!strcmp(op->node->parent->name, "central")) | 171 | if (!strcmp(op->dev.of_node->parent->name, "central")) |
172 | p->central = true; | 172 | p->central = true; |
173 | 173 | ||
174 | p->pregs = of_ioremap(&op->resource[0], 0, | 174 | p->pregs = of_ioremap(&op->resource[0], 0, |
@@ -183,7 +183,7 @@ static int __devinit fhc_probe(struct of_device *op, | |||
183 | reg = upa_readl(p->pregs + FHC_PREGS_BSR); | 183 | reg = upa_readl(p->pregs + FHC_PREGS_BSR); |
184 | p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e); | 184 | p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e); |
185 | } else { | 185 | } else { |
186 | p->board_num = of_getintprop_default(op->node, "board#", -1); | 186 | p->board_num = of_getintprop_default(op->dev.of_node, "board#", -1); |
187 | if (p->board_num == -1) { | 187 | if (p->board_num == -1) { |
188 | printk(KERN_ERR "fhc: No board# property\n"); | 188 | printk(KERN_ERR "fhc: No board# property\n"); |
189 | goto out_unmap_pregs; | 189 | goto out_unmap_pregs; |
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c index e1a9598e2a4d..936879639eb6 100644 --- a/arch/sparc/kernel/chmc.c +++ b/arch/sparc/kernel/chmc.c | |||
@@ -425,7 +425,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
425 | INIT_LIST_HEAD(&p->list); | 425 | INIT_LIST_HEAD(&p->list); |
426 | 426 | ||
427 | err = -ENODEV; | 427 | err = -ENODEV; |
428 | prop = of_get_property(op->node, "portid", &len); | 428 | prop = of_get_property(op->dev.of_node, "portid", &len); |
429 | if (!prop || len != 4) { | 429 | if (!prop || len != 4) { |
430 | printk(KERN_ERR PFX "Cannot find portid.\n"); | 430 | printk(KERN_ERR PFX "Cannot find portid.\n"); |
431 | goto out_free; | 431 | goto out_free; |
@@ -433,7 +433,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
433 | 433 | ||
434 | p->portid = *prop; | 434 | p->portid = *prop; |
435 | 435 | ||
436 | prop = of_get_property(op->node, "memory-control-register-1", &len); | 436 | prop = of_get_property(op->dev.of_node, "memory-control-register-1", &len); |
437 | if (!prop || len != 8) { | 437 | if (!prop || len != 8) { |
438 | printk(KERN_ERR PFX "Cannot get memory control register 1.\n"); | 438 | printk(KERN_ERR PFX "Cannot get memory control register 1.\n"); |
439 | goto out_free; | 439 | goto out_free; |
@@ -449,7 +449,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
449 | } | 449 | } |
450 | 450 | ||
451 | err = -ENODEV; | 451 | err = -ENODEV; |
452 | ml = of_get_property(op->node, "memory-layout", &p->layout_len); | 452 | ml = of_get_property(op->dev.of_node, "memory-layout", &p->layout_len); |
453 | if (!ml) { | 453 | if (!ml) { |
454 | printk(KERN_ERR PFX "Cannot get memory layout property.\n"); | 454 | printk(KERN_ERR PFX "Cannot get memory layout property.\n"); |
455 | goto out_iounmap; | 455 | goto out_iounmap; |
@@ -466,7 +466,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
466 | mc_list_add(&p->list); | 466 | mc_list_add(&p->list); |
467 | 467 | ||
468 | printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n", | 468 | printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n", |
469 | op->node->full_name); | 469 | op->dev.of_node->full_name); |
470 | 470 | ||
471 | dev_set_drvdata(&op->dev, p); | 471 | dev_set_drvdata(&op->dev, p); |
472 | 472 | ||
@@ -693,7 +693,7 @@ static void chmc_fetch_decode_regs(struct chmc *p) | |||
693 | static int __devinit chmc_probe(struct of_device *op, | 693 | static int __devinit chmc_probe(struct of_device *op, |
694 | const struct of_device_id *match) | 694 | const struct of_device_id *match) |
695 | { | 695 | { |
696 | struct device_node *dp = op->node; | 696 | struct device_node *dp = op->dev.of_node; |
697 | unsigned long ver; | 697 | unsigned long ver; |
698 | const void *pval; | 698 | const void *pval; |
699 | int len, portid; | 699 | int len, portid; |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 84e5386714cd..703e4aa9bc38 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -290,7 +290,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len, | |||
290 | if (mmu_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0) | 290 | if (mmu_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0) |
291 | goto err_noiommu; | 291 | goto err_noiommu; |
292 | 292 | ||
293 | res->name = op->node->name; | 293 | res->name = op->dev.of_node->name; |
294 | 294 | ||
295 | return (void *)(unsigned long)res->start; | 295 | return (void *)(unsigned long)res->start; |
296 | 296 | ||
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index 4926c1babd84..707311716142 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c | |||
@@ -254,10 +254,10 @@ static void __init build_device_resources(struct of_device *op, | |||
254 | return; | 254 | return; |
255 | 255 | ||
256 | p_op = to_of_device(parent); | 256 | p_op = to_of_device(parent); |
257 | bus = of_match_bus(p_op->node); | 257 | bus = of_match_bus(p_op->dev.of_node); |
258 | bus->count_cells(op->node, &na, &ns); | 258 | bus->count_cells(op->dev.of_node, &na, &ns); |
259 | 259 | ||
260 | preg = of_get_property(op->node, bus->addr_prop_name, &num_reg); | 260 | preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg); |
261 | if (!preg || num_reg == 0) | 261 | if (!preg || num_reg == 0) |
262 | return; | 262 | return; |
263 | 263 | ||
@@ -271,8 +271,8 @@ static void __init build_device_resources(struct of_device *op, | |||
271 | struct resource *r = &op->resource[index]; | 271 | struct resource *r = &op->resource[index]; |
272 | u32 addr[OF_MAX_ADDR_CELLS]; | 272 | u32 addr[OF_MAX_ADDR_CELLS]; |
273 | const u32 *reg = (preg + (index * ((na + ns) * 4))); | 273 | const u32 *reg = (preg + (index * ((na + ns) * 4))); |
274 | struct device_node *dp = op->node; | 274 | struct device_node *dp = op->dev.of_node; |
275 | struct device_node *pp = p_op->node; | 275 | struct device_node *pp = p_op->dev.of_node; |
276 | struct of_bus *pbus, *dbus; | 276 | struct of_bus *pbus, *dbus; |
277 | u64 size, result = OF_BAD_ADDR; | 277 | u64 size, result = OF_BAD_ADDR; |
278 | unsigned long flags; | 278 | unsigned long flags; |
@@ -321,7 +321,7 @@ static void __init build_device_resources(struct of_device *op, | |||
321 | 321 | ||
322 | if (of_resource_verbose) | 322 | if (of_resource_verbose) |
323 | printk("%s reg[%d] -> %llx\n", | 323 | printk("%s reg[%d] -> %llx\n", |
324 | op->node->full_name, index, | 324 | op->dev.of_node->full_name, index, |
325 | result); | 325 | result); |
326 | 326 | ||
327 | if (result != OF_BAD_ADDR) { | 327 | if (result != OF_BAD_ADDR) { |
@@ -329,7 +329,7 @@ static void __init build_device_resources(struct of_device *op, | |||
329 | r->end = result + size - 1; | 329 | r->end = result + size - 1; |
330 | r->flags = flags | ((result >> 32ULL) & 0xffUL); | 330 | r->flags = flags | ((result >> 32ULL) & 0xffUL); |
331 | } | 331 | } |
332 | r->name = op->node->name; | 332 | r->name = op->dev.of_node->name; |
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 5bc74161667c..c8e352e0a098 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
@@ -323,10 +323,10 @@ static void __init build_device_resources(struct of_device *op, | |||
323 | return; | 323 | return; |
324 | 324 | ||
325 | p_op = to_of_device(parent); | 325 | p_op = to_of_device(parent); |
326 | bus = of_match_bus(p_op->node); | 326 | bus = of_match_bus(p_op->dev.of_node); |
327 | bus->count_cells(op->node, &na, &ns); | 327 | bus->count_cells(op->dev.of_node, &na, &ns); |
328 | 328 | ||
329 | preg = of_get_property(op->node, bus->addr_prop_name, &num_reg); | 329 | preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg); |
330 | if (!preg || num_reg == 0) | 330 | if (!preg || num_reg == 0) |
331 | return; | 331 | return; |
332 | 332 | ||
@@ -340,7 +340,7 @@ static void __init build_device_resources(struct of_device *op, | |||
340 | if (num_reg > PROMREG_MAX) { | 340 | if (num_reg > PROMREG_MAX) { |
341 | printk(KERN_WARNING "%s: Too many regs (%d), " | 341 | printk(KERN_WARNING "%s: Too many regs (%d), " |
342 | "limiting to %d.\n", | 342 | "limiting to %d.\n", |
343 | op->node->full_name, num_reg, PROMREG_MAX); | 343 | op->dev.of_node->full_name, num_reg, PROMREG_MAX); |
344 | num_reg = PROMREG_MAX; | 344 | num_reg = PROMREG_MAX; |
345 | } | 345 | } |
346 | 346 | ||
@@ -348,8 +348,8 @@ static void __init build_device_resources(struct of_device *op, | |||
348 | struct resource *r = &op->resource[index]; | 348 | struct resource *r = &op->resource[index]; |
349 | u32 addr[OF_MAX_ADDR_CELLS]; | 349 | u32 addr[OF_MAX_ADDR_CELLS]; |
350 | const u32 *reg = (preg + (index * ((na + ns) * 4))); | 350 | const u32 *reg = (preg + (index * ((na + ns) * 4))); |
351 | struct device_node *dp = op->node; | 351 | struct device_node *dp = op->dev.of_node; |
352 | struct device_node *pp = p_op->node; | 352 | struct device_node *pp = p_op->dev.of_node; |
353 | struct of_bus *pbus, *dbus; | 353 | struct of_bus *pbus, *dbus; |
354 | u64 size, result = OF_BAD_ADDR; | 354 | u64 size, result = OF_BAD_ADDR; |
355 | unsigned long flags; | 355 | unsigned long flags; |
@@ -397,7 +397,7 @@ static void __init build_device_resources(struct of_device *op, | |||
397 | 397 | ||
398 | if (of_resource_verbose) | 398 | if (of_resource_verbose) |
399 | printk("%s reg[%d] -> %llx\n", | 399 | printk("%s reg[%d] -> %llx\n", |
400 | op->node->full_name, index, | 400 | op->dev.of_node->full_name, index, |
401 | result); | 401 | result); |
402 | 402 | ||
403 | if (result != OF_BAD_ADDR) { | 403 | if (result != OF_BAD_ADDR) { |
@@ -408,7 +408,7 @@ static void __init build_device_resources(struct of_device *op, | |||
408 | r->end = result + size - 1; | 408 | r->end = result + size - 1; |
409 | r->flags = flags; | 409 | r->flags = flags; |
410 | } | 410 | } |
411 | r->name = op->node->name; | 411 | r->name = op->dev.of_node->name; |
412 | } | 412 | } |
413 | } | 413 | } |
414 | 414 | ||
@@ -530,7 +530,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
530 | struct device *parent, | 530 | struct device *parent, |
531 | unsigned int irq) | 531 | unsigned int irq) |
532 | { | 532 | { |
533 | struct device_node *dp = op->node; | 533 | struct device_node *dp = op->dev.of_node; |
534 | struct device_node *pp, *ip; | 534 | struct device_node *pp, *ip; |
535 | unsigned int orig_irq = irq; | 535 | unsigned int orig_irq = irq; |
536 | int nid; | 536 | int nid; |
@@ -575,7 +575,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
575 | 575 | ||
576 | if (of_irq_verbose) | 576 | if (of_irq_verbose) |
577 | printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", | 577 | printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", |
578 | op->node->full_name, | 578 | op->dev.of_node->full_name, |
579 | pp->full_name, this_orig_irq, | 579 | pp->full_name, this_orig_irq, |
580 | (iret ? iret->full_name : "NULL"), irq); | 580 | (iret ? iret->full_name : "NULL"), irq); |
581 | 581 | ||
@@ -594,7 +594,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
594 | if (of_irq_verbose) | 594 | if (of_irq_verbose) |
595 | printk("%s: PCI swizzle [%s] " | 595 | printk("%s: PCI swizzle [%s] " |
596 | "%x --> %x\n", | 596 | "%x --> %x\n", |
597 | op->node->full_name, | 597 | op->dev.of_node->full_name, |
598 | pp->full_name, this_orig_irq, | 598 | pp->full_name, this_orig_irq, |
599 | irq); | 599 | irq); |
600 | 600 | ||
@@ -611,11 +611,11 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
611 | if (!ip) | 611 | if (!ip) |
612 | return orig_irq; | 612 | return orig_irq; |
613 | 613 | ||
614 | irq = ip->irq_trans->irq_build(op->node, irq, | 614 | irq = ip->irq_trans->irq_build(op->dev.of_node, irq, |
615 | ip->irq_trans->data); | 615 | ip->irq_trans->data); |
616 | if (of_irq_verbose) | 616 | if (of_irq_verbose) |
617 | printk("%s: Apply IRQ trans [%s] %x --> %x\n", | 617 | printk("%s: Apply IRQ trans [%s] %x --> %x\n", |
618 | op->node->full_name, ip->full_name, orig_irq, irq); | 618 | op->dev.of_node->full_name, ip->full_name, orig_irq, irq); |
619 | 619 | ||
620 | out: | 620 | out: |
621 | nid = of_node_to_nid(dp); | 621 | nid = of_node_to_nid(dp); |
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c index 0247e68210b3..10c6c36a6e75 100644 --- a/arch/sparc/kernel/of_device_common.c +++ b/arch/sparc/kernel/of_device_common.c | |||
@@ -16,7 +16,7 @@ static int node_match(struct device *dev, void *data) | |||
16 | struct of_device *op = to_of_device(dev); | 16 | struct of_device *op = to_of_device(dev); |
17 | struct device_node *dp = data; | 17 | struct device_node *dp = data; |
18 | 18 | ||
19 | return (op->node == dp); | 19 | return (op->dev.of_node == dp); |
20 | } | 20 | } |
21 | 21 | ||
22 | struct of_device *of_find_device_by_node(struct device_node *dp) | 22 | struct of_device *of_find_device_by_node(struct device_node *dp) |
@@ -48,7 +48,7 @@ EXPORT_SYMBOL(irq_of_parse_and_map); | |||
48 | void of_propagate_archdata(struct of_device *bus) | 48 | void of_propagate_archdata(struct of_device *bus) |
49 | { | 49 | { |
50 | struct dev_archdata *bus_sd = &bus->dev.archdata; | 50 | struct dev_archdata *bus_sd = &bus->dev.archdata; |
51 | struct device_node *bus_dp = bus->node; | 51 | struct device_node *bus_dp = bus->dev.of_node; |
52 | struct device_node *dp; | 52 | struct device_node *dp; |
53 | 53 | ||
54 | for (dp = bus_dp->child; dp; dp = dp->sibling) { | 54 | for (dp = bus_dp->child; dp; dp = dp->sibling) { |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 0c920147b4ef..c7a214ec5aff 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -654,7 +654,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char * | |||
654 | struct device_node *dp; | 654 | struct device_node *dp; |
655 | 655 | ||
656 | pdev = to_pci_dev(dev); | 656 | pdev = to_pci_dev(dev); |
657 | dp = pdev->dev.archdata.prom_node; | 657 | dp = pdev->dev.of_node; |
658 | 658 | ||
659 | return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name); | 659 | return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name); |
660 | } | 660 | } |
@@ -684,7 +684,7 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus) | |||
684 | struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | 684 | struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, |
685 | struct device *parent) | 685 | struct device *parent) |
686 | { | 686 | { |
687 | struct device_node *node = pbm->op->node; | 687 | struct device_node *node = pbm->op->dev.of_node; |
688 | struct pci_bus *bus; | 688 | struct pci_bus *bus; |
689 | 689 | ||
690 | printk("PCI: Scanning PBM %s\n", node->full_name); | 690 | printk("PCI: Scanning PBM %s\n", node->full_name); |
@@ -1023,7 +1023,7 @@ void arch_teardown_msi_irq(unsigned int virt_irq) | |||
1023 | 1023 | ||
1024 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | 1024 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) |
1025 | { | 1025 | { |
1026 | return pdev->dev.archdata.prom_node; | 1026 | return pdev->dev.of_node; |
1027 | } | 1027 | } |
1028 | EXPORT_SYMBOL(pci_device_to_OF_node); | 1028 | EXPORT_SYMBOL(pci_device_to_OF_node); |
1029 | 1029 | ||
@@ -1152,15 +1152,13 @@ static int __init of_pci_slot_init(void) | |||
1152 | struct device_node *node; | 1152 | struct device_node *node; |
1153 | 1153 | ||
1154 | if (pbus->self) { | 1154 | if (pbus->self) { |
1155 | struct dev_archdata *sd = pbus->self->sysdata; | ||
1156 | |||
1157 | /* PCI->PCI bridge */ | 1155 | /* PCI->PCI bridge */ |
1158 | node = sd->prom_node; | 1156 | node = pbus->self->dev.of_node; |
1159 | } else { | 1157 | } else { |
1160 | struct pci_pbm_info *pbm = pbus->sysdata; | 1158 | struct pci_pbm_info *pbm = pbus->sysdata; |
1161 | 1159 | ||
1162 | /* Host PCI controller */ | 1160 | /* Host PCI controller */ |
1163 | node = pbm->op->node; | 1161 | node = pbm->op->dev.of_node; |
1164 | } | 1162 | } |
1165 | 1163 | ||
1166 | pci_bus_slot_names(node, pbus); | 1164 | pci_bus_slot_names(node, pbus); |
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c index 8a000583b5cf..6c7a33af3ba6 100644 --- a/arch/sparc/kernel/pci_common.c +++ b/arch/sparc/kernel/pci_common.c | |||
@@ -314,12 +314,12 @@ struct pci_ops sun4v_pci_ops = { | |||
314 | 314 | ||
315 | void pci_get_pbm_props(struct pci_pbm_info *pbm) | 315 | void pci_get_pbm_props(struct pci_pbm_info *pbm) |
316 | { | 316 | { |
317 | const u32 *val = of_get_property(pbm->op->node, "bus-range", NULL); | 317 | const u32 *val = of_get_property(pbm->op->dev.of_node, "bus-range", NULL); |
318 | 318 | ||
319 | pbm->pci_first_busno = val[0]; | 319 | pbm->pci_first_busno = val[0]; |
320 | pbm->pci_last_busno = val[1]; | 320 | pbm->pci_last_busno = val[1]; |
321 | 321 | ||
322 | val = of_get_property(pbm->op->node, "ino-bitmap", NULL); | 322 | val = of_get_property(pbm->op->dev.of_node, "ino-bitmap", NULL); |
323 | if (val) { | 323 | if (val) { |
324 | pbm->ino_bitmap = (((u64)val[1] << 32UL) | | 324 | pbm->ino_bitmap = (((u64)val[1] << 32UL) | |
325 | ((u64)val[0] << 0UL)); | 325 | ((u64)val[0] << 0UL)); |
@@ -365,7 +365,8 @@ static void pci_register_legacy_regions(struct resource *io_res, | |||
365 | 365 | ||
366 | static void pci_register_iommu_region(struct pci_pbm_info *pbm) | 366 | static void pci_register_iommu_region(struct pci_pbm_info *pbm) |
367 | { | 367 | { |
368 | const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); | 368 | const u32 *vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", |
369 | NULL); | ||
369 | 370 | ||
370 | if (vdma) { | 371 | if (vdma) { |
371 | struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL); | 372 | struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL); |
@@ -394,7 +395,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
394 | int num_pbm_ranges; | 395 | int num_pbm_ranges; |
395 | 396 | ||
396 | saw_mem = saw_io = 0; | 397 | saw_mem = saw_io = 0; |
397 | pbm_ranges = of_get_property(pbm->op->node, "ranges", &i); | 398 | pbm_ranges = of_get_property(pbm->op->dev.of_node, "ranges", &i); |
398 | if (!pbm_ranges) { | 399 | if (!pbm_ranges) { |
399 | prom_printf("PCI: Fatal error, missing PBM ranges property " | 400 | prom_printf("PCI: Fatal error, missing PBM ranges property " |
400 | " for %s\n", | 401 | " for %s\n", |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index d53f45bc7dda..ff844baa28e6 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -413,7 +413,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, | |||
413 | struct of_device *op, u32 portid) | 413 | struct of_device *op, u32 portid) |
414 | { | 414 | { |
415 | const struct linux_prom64_registers *regs; | 415 | const struct linux_prom64_registers *regs; |
416 | struct device_node *dp = op->node; | 416 | struct device_node *dp = op->dev.of_node; |
417 | int err; | 417 | int err; |
418 | 418 | ||
419 | pbm->numa_node = -1; | 419 | pbm->numa_node = -1; |
@@ -458,7 +458,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, | |||
458 | static int __devinit fire_probe(struct of_device *op, | 458 | static int __devinit fire_probe(struct of_device *op, |
459 | const struct of_device_id *match) | 459 | const struct of_device_id *match) |
460 | { | 460 | { |
461 | struct device_node *dp = op->node; | 461 | struct device_node *dp = op->dev.of_node; |
462 | struct pci_pbm_info *pbm; | 462 | struct pci_pbm_info *pbm; |
463 | struct iommu *iommu; | 463 | struct iommu *iommu; |
464 | u32 portid; | 464 | u32 portid; |
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index e0ef847219c3..548b8ca9c210 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c | |||
@@ -324,7 +324,7 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, | |||
324 | const u32 *val; | 324 | const u32 *val; |
325 | int len; | 325 | int len; |
326 | 326 | ||
327 | val = of_get_property(pbm->op->node, "#msi-eqs", &len); | 327 | val = of_get_property(pbm->op->dev.of_node, "#msi-eqs", &len); |
328 | if (!val || len != 4) | 328 | if (!val || len != 4) |
329 | goto no_msi; | 329 | goto no_msi; |
330 | pbm->msiq_num = *val; | 330 | pbm->msiq_num = *val; |
@@ -347,16 +347,16 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, | |||
347 | u32 msi64_len; | 347 | u32 msi64_len; |
348 | } *arng; | 348 | } *arng; |
349 | 349 | ||
350 | val = of_get_property(pbm->op->node, "msi-eq-size", &len); | 350 | val = of_get_property(pbm->op->dev.of_node, "msi-eq-size", &len); |
351 | if (!val || len != 4) | 351 | if (!val || len != 4) |
352 | goto no_msi; | 352 | goto no_msi; |
353 | 353 | ||
354 | pbm->msiq_ent_count = *val; | 354 | pbm->msiq_ent_count = *val; |
355 | 355 | ||
356 | mqp = of_get_property(pbm->op->node, | 356 | mqp = of_get_property(pbm->op->dev.of_node, |
357 | "msi-eq-to-devino", &len); | 357 | "msi-eq-to-devino", &len); |
358 | if (!mqp) | 358 | if (!mqp) |
359 | mqp = of_get_property(pbm->op->node, | 359 | mqp = of_get_property(pbm->op->dev.of_node, |
360 | "msi-eq-devino", &len); | 360 | "msi-eq-devino", &len); |
361 | if (!mqp || len != sizeof(struct msiq_prop)) | 361 | if (!mqp || len != sizeof(struct msiq_prop)) |
362 | goto no_msi; | 362 | goto no_msi; |
@@ -364,27 +364,27 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, | |||
364 | pbm->msiq_first = mqp->first_msiq; | 364 | pbm->msiq_first = mqp->first_msiq; |
365 | pbm->msiq_first_devino = mqp->first_devino; | 365 | pbm->msiq_first_devino = mqp->first_devino; |
366 | 366 | ||
367 | val = of_get_property(pbm->op->node, "#msi", &len); | 367 | val = of_get_property(pbm->op->dev.of_node, "#msi", &len); |
368 | if (!val || len != 4) | 368 | if (!val || len != 4) |
369 | goto no_msi; | 369 | goto no_msi; |
370 | pbm->msi_num = *val; | 370 | pbm->msi_num = *val; |
371 | 371 | ||
372 | mrng = of_get_property(pbm->op->node, "msi-ranges", &len); | 372 | mrng = of_get_property(pbm->op->dev.of_node, "msi-ranges", &len); |
373 | if (!mrng || len != sizeof(struct msi_range_prop)) | 373 | if (!mrng || len != sizeof(struct msi_range_prop)) |
374 | goto no_msi; | 374 | goto no_msi; |
375 | pbm->msi_first = mrng->first_msi; | 375 | pbm->msi_first = mrng->first_msi; |
376 | 376 | ||
377 | val = of_get_property(pbm->op->node, "msi-data-mask", &len); | 377 | val = of_get_property(pbm->op->dev.of_node, "msi-data-mask", &len); |
378 | if (!val || len != 4) | 378 | if (!val || len != 4) |
379 | goto no_msi; | 379 | goto no_msi; |
380 | pbm->msi_data_mask = *val; | 380 | pbm->msi_data_mask = *val; |
381 | 381 | ||
382 | val = of_get_property(pbm->op->node, "msix-data-width", &len); | 382 | val = of_get_property(pbm->op->dev.of_node, "msix-data-width", &len); |
383 | if (!val || len != 4) | 383 | if (!val || len != 4) |
384 | goto no_msi; | 384 | goto no_msi; |
385 | pbm->msix_data_width = *val; | 385 | pbm->msix_data_width = *val; |
386 | 386 | ||
387 | arng = of_get_property(pbm->op->node, "msi-address-ranges", | 387 | arng = of_get_property(pbm->op->dev.of_node, "msi-address-ranges", |
388 | &len); | 388 | &len); |
389 | if (!arng || len != sizeof(struct addr_range_prop)) | 389 | if (!arng || len != sizeof(struct addr_range_prop)) |
390 | goto no_msi; | 390 | goto no_msi; |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 142b9d6984a8..e675e21c6df6 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -285,7 +285,7 @@ static irqreturn_t psycho_ce_intr(int irq, void *dev_id) | |||
285 | #define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */ | 285 | #define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */ |
286 | static void psycho_register_error_handlers(struct pci_pbm_info *pbm) | 286 | static void psycho_register_error_handlers(struct pci_pbm_info *pbm) |
287 | { | 287 | { |
288 | struct of_device *op = of_find_device_by_node(pbm->op->node); | 288 | struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); |
289 | unsigned long base = pbm->controller_regs; | 289 | unsigned long base = pbm->controller_regs; |
290 | u64 tmp; | 290 | u64 tmp; |
291 | int err; | 291 | int err; |
@@ -507,7 +507,7 @@ static int __devinit psycho_probe(struct of_device *op, | |||
507 | const struct of_device_id *match) | 507 | const struct of_device_id *match) |
508 | { | 508 | { |
509 | const struct linux_prom64_registers *pr_regs; | 509 | const struct linux_prom64_registers *pr_regs; |
510 | struct device_node *dp = op->node; | 510 | struct device_node *dp = op->dev.of_node; |
511 | struct pci_pbm_info *pbm; | 511 | struct pci_pbm_info *pbm; |
512 | struct iommu *iommu; | 512 | struct iommu *iommu; |
513 | int is_pbm_a, err; | 513 | int is_pbm_a, err; |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index ba6fbeba3e2c..5048498daade 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -310,7 +310,7 @@ static irqreturn_t sabre_ce_intr(int irq, void *dev_id) | |||
310 | 310 | ||
311 | static void sabre_register_error_handlers(struct pci_pbm_info *pbm) | 311 | static void sabre_register_error_handlers(struct pci_pbm_info *pbm) |
312 | { | 312 | { |
313 | struct device_node *dp = pbm->op->node; | 313 | struct device_node *dp = pbm->op->dev.of_node; |
314 | struct of_device *op; | 314 | struct of_device *op; |
315 | unsigned long base = pbm->controller_regs; | 315 | unsigned long base = pbm->controller_regs; |
316 | u64 tmp; | 316 | u64 tmp; |
@@ -456,7 +456,7 @@ static int __devinit sabre_probe(struct of_device *op, | |||
456 | const struct of_device_id *match) | 456 | const struct of_device_id *match) |
457 | { | 457 | { |
458 | const struct linux_prom64_registers *pr_regs; | 458 | const struct linux_prom64_registers *pr_regs; |
459 | struct device_node *dp = op->node; | 459 | struct device_node *dp = op->dev.of_node; |
460 | struct pci_pbm_info *pbm; | 460 | struct pci_pbm_info *pbm; |
461 | u32 upa_portid, dma_mask; | 461 | u32 upa_portid, dma_mask; |
462 | struct iommu *iommu; | 462 | struct iommu *iommu; |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 2b5cdde77af7..2f3f9212b063 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -844,7 +844,7 @@ static int pbm_routes_this_ino(struct pci_pbm_info *pbm, u32 ino) | |||
844 | */ | 844 | */ |
845 | static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm) | 845 | static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm) |
846 | { | 846 | { |
847 | struct of_device *op = of_find_device_by_node(pbm->op->node); | 847 | struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); |
848 | u64 tmp, err_mask, err_no_mask; | 848 | u64 tmp, err_mask, err_no_mask; |
849 | int err; | 849 | int err; |
850 | 850 | ||
@@ -939,7 +939,7 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm) | |||
939 | 939 | ||
940 | static void schizo_register_error_handlers(struct pci_pbm_info *pbm) | 940 | static void schizo_register_error_handlers(struct pci_pbm_info *pbm) |
941 | { | 941 | { |
942 | struct of_device *op = of_find_device_by_node(pbm->op->node); | 942 | struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); |
943 | u64 tmp, err_mask, err_no_mask; | 943 | u64 tmp, err_mask, err_no_mask; |
944 | int err; | 944 | int err; |
945 | 945 | ||
@@ -1068,7 +1068,7 @@ static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm, | |||
1068 | { | 1068 | { |
1069 | pbm_config_busmastering(pbm); | 1069 | pbm_config_busmastering(pbm); |
1070 | pbm->is_66mhz_capable = | 1070 | pbm->is_66mhz_capable = |
1071 | (of_find_property(pbm->op->node, "66mhz-capable", NULL) | 1071 | (of_find_property(pbm->op->dev.of_node, "66mhz-capable", NULL) |
1072 | != NULL); | 1072 | != NULL); |
1073 | 1073 | ||
1074 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); | 1074 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); |
@@ -1138,7 +1138,7 @@ static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm) | |||
1138 | u32 dma_mask; | 1138 | u32 dma_mask; |
1139 | u64 control; | 1139 | u64 control; |
1140 | 1140 | ||
1141 | vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); | 1141 | vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL); |
1142 | if (!vdma) | 1142 | if (!vdma) |
1143 | vdma = vdma_default; | 1143 | vdma = vdma_default; |
1144 | 1144 | ||
@@ -1268,7 +1268,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) | |||
1268 | pbm->chip_version >= 0x2) | 1268 | pbm->chip_version >= 0x2) |
1269 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; | 1269 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; |
1270 | 1270 | ||
1271 | if (!of_find_property(pbm->op->node, "no-bus-parking", NULL)) | 1271 | if (!of_find_property(pbm->op->dev.of_node, "no-bus-parking", NULL)) |
1272 | tmp |= SCHIZO_PCICTRL_PARK; | 1272 | tmp |= SCHIZO_PCICTRL_PARK; |
1273 | else | 1273 | else |
1274 | tmp &= ~SCHIZO_PCICTRL_PARK; | 1274 | tmp &= ~SCHIZO_PCICTRL_PARK; |
@@ -1311,7 +1311,7 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, | |||
1311 | int chip_type) | 1311 | int chip_type) |
1312 | { | 1312 | { |
1313 | const struct linux_prom64_registers *regs; | 1313 | const struct linux_prom64_registers *regs; |
1314 | struct device_node *dp = op->node; | 1314 | struct device_node *dp = op->dev.of_node; |
1315 | const char *chipset_name; | 1315 | const char *chipset_name; |
1316 | int is_pbm_a, err; | 1316 | int is_pbm_a, err; |
1317 | 1317 | ||
@@ -1415,7 +1415,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid, | |||
1415 | 1415 | ||
1416 | static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type) | 1416 | static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type) |
1417 | { | 1417 | { |
1418 | struct device_node *dp = op->node; | 1418 | struct device_node *dp = op->dev.of_node; |
1419 | struct pci_pbm_info *pbm; | 1419 | struct pci_pbm_info *pbm; |
1420 | struct iommu *iommu; | 1420 | struct iommu *iommu; |
1421 | u32 portid; | 1421 | u32 portid; |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 23c33ff9c31e..5c11f56cedf8 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -540,7 +540,7 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, | |||
540 | struct property *prop; | 540 | struct property *prop; |
541 | struct device_node *dp; | 541 | struct device_node *dp; |
542 | 542 | ||
543 | dp = pbm->op->node; | 543 | dp = pbm->op->dev.of_node; |
544 | prop = of_find_property(dp, "66mhz-capable", NULL); | 544 | prop = of_find_property(dp, "66mhz-capable", NULL); |
545 | pbm->is_66mhz_capable = (prop != NULL); | 545 | pbm->is_66mhz_capable = (prop != NULL); |
546 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); | 546 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); |
@@ -584,7 +584,7 @@ static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm) | |||
584 | u32 dma_mask, dma_offset; | 584 | u32 dma_mask, dma_offset; |
585 | const u32 *vdma; | 585 | const u32 *vdma; |
586 | 586 | ||
587 | vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); | 587 | vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL); |
588 | if (!vdma) | 588 | if (!vdma) |
589 | vdma = vdma_default; | 589 | vdma = vdma_default; |
590 | 590 | ||
@@ -881,7 +881,7 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm) | |||
881 | static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, | 881 | static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, |
882 | struct of_device *op, u32 devhandle) | 882 | struct of_device *op, u32 devhandle) |
883 | { | 883 | { |
884 | struct device_node *dp = op->node; | 884 | struct device_node *dp = op->dev.of_node; |
885 | int err; | 885 | int err; |
886 | 886 | ||
887 | pbm->numa_node = of_node_to_nid(dp); | 887 | pbm->numa_node = of_node_to_nid(dp); |
@@ -929,7 +929,7 @@ static int __devinit pci_sun4v_probe(struct of_device *op, | |||
929 | u32 devhandle; | 929 | u32 devhandle; |
930 | int i, err; | 930 | int i, err; |
931 | 931 | ||
932 | dp = op->node; | 932 | dp = op->dev.of_node; |
933 | 933 | ||
934 | if (!hvapi_negotiated++) { | 934 | if (!hvapi_negotiated++) { |
935 | err = sun4v_hvapi_register(HV_GRP_PCI, | 935 | err = sun4v_hvapi_register(HV_GRP_PCI, |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index e2a045c235a1..e3f806a7423b 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -41,9 +41,9 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id | |||
41 | power_reg = of_ioremap(res, 0, 0x4, "power"); | 41 | power_reg = of_ioremap(res, 0, 0x4, "power"); |
42 | 42 | ||
43 | printk(KERN_INFO "%s: Control reg at %llx\n", | 43 | printk(KERN_INFO "%s: Control reg at %llx\n", |
44 | op->node->name, res->start); | 44 | op->dev.of_node->name, res->start); |
45 | 45 | ||
46 | if (has_button_interrupt(irq, op->node)) { | 46 | if (has_button_interrupt(irq, op->dev.of_node)) { |
47 | if (request_irq(irq, | 47 | if (request_irq(irq, |
48 | power_handler, 0, "power", NULL) < 0) | 48 | power_handler, 0, "power", NULL) < 0) |
49 | printk(KERN_ERR "power: Cannot setup IRQ handler.\n"); | 49 | printk(KERN_ERR "power: Cannot setup IRQ handler.\n"); |
diff --git a/arch/sparc/kernel/psycho_common.c b/arch/sparc/kernel/psycho_common.c index 8f1478475421..3f34ac853931 100644 --- a/arch/sparc/kernel/psycho_common.c +++ b/arch/sparc/kernel/psycho_common.c | |||
@@ -450,7 +450,7 @@ int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize, | |||
450 | void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op, | 450 | void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op, |
451 | const char *chip_name, int chip_type) | 451 | const char *chip_name, int chip_type) |
452 | { | 452 | { |
453 | struct device_node *dp = op->node; | 453 | struct device_node *dp = op->dev.of_node; |
454 | 454 | ||
455 | pbm->name = dp->full_name; | 455 | pbm->name = dp->full_name; |
456 | pbm->numa_node = -1; | 456 | pbm->numa_node = -1; |
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index 406e0872504e..cfeaf04b9cdf 100644 --- a/arch/sparc/kernel/sbus.c +++ b/arch/sparc/kernel/sbus.c | |||
@@ -63,10 +63,10 @@ void sbus_set_sbus64(struct device *dev, int bursts) | |||
63 | int slot; | 63 | int slot; |
64 | u64 val; | 64 | u64 val; |
65 | 65 | ||
66 | regs = of_get_property(op->node, "reg", NULL); | 66 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
67 | if (!regs) { | 67 | if (!regs) { |
68 | printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n", | 68 | printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n", |
69 | op->node->full_name); | 69 | op->dev.of_node->full_name); |
70 | return; | 70 | return; |
71 | } | 71 | } |
72 | slot = regs->which_io; | 72 | slot = regs->which_io; |
@@ -287,7 +287,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id) | |||
287 | SYSIO_UEAFSR_SPIO | SYSIO_UEAFSR_SDRD | SYSIO_UEAFSR_SDWR); | 287 | SYSIO_UEAFSR_SPIO | SYSIO_UEAFSR_SDRD | SYSIO_UEAFSR_SDWR); |
288 | upa_writeq(error_bits, afsr_reg); | 288 | upa_writeq(error_bits, afsr_reg); |
289 | 289 | ||
290 | portid = of_getintprop_default(op->node, "portid", -1); | 290 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
291 | 291 | ||
292 | /* Log the error. */ | 292 | /* Log the error. */ |
293 | printk("SYSIO[%x]: Uncorrectable ECC Error, primary error type[%s]\n", | 293 | printk("SYSIO[%x]: Uncorrectable ECC Error, primary error type[%s]\n", |
@@ -361,7 +361,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id) | |||
361 | SYSIO_CEAFSR_SPIO | SYSIO_CEAFSR_SDRD | SYSIO_CEAFSR_SDWR); | 361 | SYSIO_CEAFSR_SPIO | SYSIO_CEAFSR_SDRD | SYSIO_CEAFSR_SDWR); |
362 | upa_writeq(error_bits, afsr_reg); | 362 | upa_writeq(error_bits, afsr_reg); |
363 | 363 | ||
364 | portid = of_getintprop_default(op->node, "portid", -1); | 364 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
365 | 365 | ||
366 | printk("SYSIO[%x]: Correctable ECC Error, primary error type[%s]\n", | 366 | printk("SYSIO[%x]: Correctable ECC Error, primary error type[%s]\n", |
367 | portid, | 367 | portid, |
@@ -439,7 +439,7 @@ static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id) | |||
439 | SYSIO_SBAFSR_SLE | SYSIO_SBAFSR_STO | SYSIO_SBAFSR_SBERR); | 439 | SYSIO_SBAFSR_SLE | SYSIO_SBAFSR_STO | SYSIO_SBAFSR_SBERR); |
440 | upa_writeq(error_bits, afsr_reg); | 440 | upa_writeq(error_bits, afsr_reg); |
441 | 441 | ||
442 | portid = of_getintprop_default(op->node, "portid", -1); | 442 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
443 | 443 | ||
444 | /* Log the error. */ | 444 | /* Log the error. */ |
445 | printk("SYSIO[%x]: SBUS Error, primary error type[%s] read(%d)\n", | 445 | printk("SYSIO[%x]: SBUS Error, primary error type[%s] read(%d)\n", |
@@ -496,7 +496,7 @@ static void __init sysio_register_error_handlers(struct of_device *op) | |||
496 | u64 control; | 496 | u64 control; |
497 | int portid; | 497 | int portid; |
498 | 498 | ||
499 | portid = of_getintprop_default(op->node, "portid", -1); | 499 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
500 | 500 | ||
501 | irq = sbus_build_irq(op, SYSIO_UE_INO); | 501 | irq = sbus_build_irq(op, SYSIO_UE_INO); |
502 | if (request_irq(irq, sysio_ue_handler, 0, | 502 | if (request_irq(irq, sysio_ue_handler, 0, |
@@ -537,7 +537,7 @@ static void __init sysio_register_error_handlers(struct of_device *op) | |||
537 | static void __init sbus_iommu_init(struct of_device *op) | 537 | static void __init sbus_iommu_init(struct of_device *op) |
538 | { | 538 | { |
539 | const struct linux_prom64_registers *pr; | 539 | const struct linux_prom64_registers *pr; |
540 | struct device_node *dp = op->node; | 540 | struct device_node *dp = op->dev.of_node; |
541 | struct iommu *iommu; | 541 | struct iommu *iommu; |
542 | struct strbuf *strbuf; | 542 | struct strbuf *strbuf; |
543 | unsigned long regs, reg_base; | 543 | unsigned long regs, reg_base; |
@@ -589,7 +589,7 @@ static void __init sbus_iommu_init(struct of_device *op) | |||
589 | */ | 589 | */ |
590 | iommu->write_complete_reg = regs + 0x2000UL; | 590 | iommu->write_complete_reg = regs + 0x2000UL; |
591 | 591 | ||
592 | portid = of_getintprop_default(op->node, "portid", -1); | 592 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
593 | printk(KERN_INFO "SYSIO: UPA portID %x, at %016lx\n", | 593 | printk(KERN_INFO "SYSIO: UPA portID %x, at %016lx\n", |
594 | portid, regs); | 594 | portid, regs); |
595 | 595 | ||
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 0d4c09b15efc..e0dbed9503d4 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -152,7 +152,7 @@ static struct platform_device m48t59_rtc = { | |||
152 | 152 | ||
153 | static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) | 153 | static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) |
154 | { | 154 | { |
155 | struct device_node *dp = op->node; | 155 | struct device_node *dp = op->dev.of_node; |
156 | const char *model = of_get_property(dp, "model", NULL); | 156 | const char *model = of_get_property(dp, "model", NULL); |
157 | 157 | ||
158 | if (!model) | 158 | if (!model) |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index c7bbe6cf7b85..9099ca095641 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -424,7 +424,7 @@ static int __devinit rtc_probe(struct of_device *op, const struct of_device_id * | |||
424 | struct resource *r; | 424 | struct resource *r; |
425 | 425 | ||
426 | printk(KERN_INFO "%s: RTC regs at 0x%llx\n", | 426 | printk(KERN_INFO "%s: RTC regs at 0x%llx\n", |
427 | op->node->full_name, op->resource[0].start); | 427 | op->dev.of_node->full_name, op->resource[0].start); |
428 | 428 | ||
429 | /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons | 429 | /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons |
430 | * up a fake resource so that the probe works for all cases. | 430 | * up a fake resource so that the probe works for all cases. |
@@ -480,7 +480,7 @@ static int __devinit bq4802_probe(struct of_device *op, const struct of_device_i | |||
480 | { | 480 | { |
481 | 481 | ||
482 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", | 482 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", |
483 | op->node->full_name, op->resource[0].start); | 483 | op->dev.of_node->full_name, op->resource[0].start); |
484 | 484 | ||
485 | rtc_bq4802_device.resource = &op->resource[0]; | 485 | rtc_bq4802_device.resource = &op->resource[0]; |
486 | return platform_device_register(&rtc_bq4802_device); | 486 | return platform_device_register(&rtc_bq4802_device); |
@@ -534,7 +534,7 @@ static struct platform_device m48t59_rtc = { | |||
534 | 534 | ||
535 | static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match) | 535 | static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match) |
536 | { | 536 | { |
537 | struct device_node *dp = op->node; | 537 | struct device_node *dp = op->dev.of_node; |
538 | 538 | ||
539 | /* On an Enterprise system there can be multiple mostek clocks. | 539 | /* On an Enterprise system there can be multiple mostek clocks. |
540 | * We should only match the one that is on the central FHC bus. | 540 | * We should only match the one that is on the central FHC bus. |