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 | |
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>
157 files changed, 497 insertions, 488 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. |
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index 211b6438b3a0..c74f13bc9876 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c | |||
@@ -1139,7 +1139,7 @@ static int __devinit pata_macio_attach(struct macio_dev *mdev, | |||
1139 | "Failed to allocate private memory\n"); | 1139 | "Failed to allocate private memory\n"); |
1140 | return -ENOMEM; | 1140 | return -ENOMEM; |
1141 | } | 1141 | } |
1142 | priv->node = of_node_get(mdev->ofdev.node); | 1142 | priv->node = of_node_get(mdev->ofdev.dev.of_node); |
1143 | priv->mdev = mdev; | 1143 | priv->mdev = mdev; |
1144 | priv->dev = &mdev->ofdev.dev; | 1144 | priv->dev = &mdev->ofdev.dev; |
1145 | 1145 | ||
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index 9f5b053611dd..4cce719add3f 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c | |||
@@ -694,7 +694,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) | |||
694 | struct bcom_task *dmatsk = NULL; | 694 | struct bcom_task *dmatsk = NULL; |
695 | 695 | ||
696 | /* Get ipb frequency */ | 696 | /* Get ipb frequency */ |
697 | ipb_freq = mpc5xxx_get_bus_frequency(op->node); | 697 | ipb_freq = mpc5xxx_get_bus_frequency(op->dev.of_node); |
698 | if (!ipb_freq) { | 698 | if (!ipb_freq) { |
699 | dev_err(&op->dev, "could not determine IPB bus frequency\n"); | 699 | dev_err(&op->dev, "could not determine IPB bus frequency\n"); |
700 | return -ENODEV; | 700 | return -ENODEV; |
@@ -702,7 +702,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) | |||
702 | 702 | ||
703 | /* Get device base address from device tree, request the region | 703 | /* Get device base address from device tree, request the region |
704 | * and ioremap it. */ | 704 | * and ioremap it. */ |
705 | rv = of_address_to_resource(op->node, 0, &res_mem); | 705 | rv = of_address_to_resource(op->dev.of_node, 0, &res_mem); |
706 | if (rv) { | 706 | if (rv) { |
707 | dev_err(&op->dev, "could not determine device base address\n"); | 707 | dev_err(&op->dev, "could not determine device base address\n"); |
708 | return rv; | 708 | return rv; |
@@ -735,14 +735,14 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) | |||
735 | * The MPC5200 ATA controller supports MWDMA modes 0, 1 and 2 and | 735 | * The MPC5200 ATA controller supports MWDMA modes 0, 1 and 2 and |
736 | * UDMA modes 0, 1 and 2. | 736 | * UDMA modes 0, 1 and 2. |
737 | */ | 737 | */ |
738 | prop = of_get_property(op->node, "mwdma-mode", &proplen); | 738 | prop = of_get_property(op->dev.of_node, "mwdma-mode", &proplen); |
739 | if ((prop) && (proplen >= 4)) | 739 | if ((prop) && (proplen >= 4)) |
740 | mwdma_mask = ATA_MWDMA2 & ((1 << (*prop + 1)) - 1); | 740 | mwdma_mask = ATA_MWDMA2 & ((1 << (*prop + 1)) - 1); |
741 | prop = of_get_property(op->node, "udma-mode", &proplen); | 741 | prop = of_get_property(op->dev.of_node, "udma-mode", &proplen); |
742 | if ((prop) && (proplen >= 4)) | 742 | if ((prop) && (proplen >= 4)) |
743 | udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1); | 743 | udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1); |
744 | 744 | ||
745 | ata_irq = irq_of_parse_and_map(op->node, 0); | 745 | ata_irq = irq_of_parse_and_map(op->dev.of_node, 0); |
746 | if (ata_irq == NO_IRQ) { | 746 | if (ata_irq == NO_IRQ) { |
747 | dev_err(&op->dev, "error mapping irq\n"); | 747 | dev_err(&op->dev, "error mapping irq\n"); |
748 | return -EINVAL; | 748 | return -EINVAL; |
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index 1f18ad9e4fe1..19da29f011db 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c | |||
@@ -18,7 +18,7 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev, | |||
18 | const struct of_device_id *match) | 18 | const struct of_device_id *match) |
19 | { | 19 | { |
20 | int ret; | 20 | int ret; |
21 | struct device_node *dn = ofdev->node; | 21 | struct device_node *dn = ofdev->dev.of_node; |
22 | struct resource io_res; | 22 | struct resource io_res; |
23 | struct resource ctl_res; | 23 | struct resource ctl_res; |
24 | struct resource irq_res; | 24 | struct resource irq_res; |
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index a69192b38b43..e3339e25b152 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -1313,7 +1313,7 @@ static int sata_fsl_probe(struct of_device *ofdev, | |||
1313 | dev_printk(KERN_INFO, &ofdev->dev, | 1313 | dev_printk(KERN_INFO, &ofdev->dev, |
1314 | "Sata FSL Platform/CSB Driver init\n"); | 1314 | "Sata FSL Platform/CSB Driver init\n"); |
1315 | 1315 | ||
1316 | hcr_base = of_iomap(ofdev->node, 0); | 1316 | hcr_base = of_iomap(ofdev->dev.of_node, 0); |
1317 | if (!hcr_base) | 1317 | if (!hcr_base) |
1318 | goto error_exit_with_cleanup; | 1318 | goto error_exit_with_cleanup; |
1319 | 1319 | ||
@@ -1332,7 +1332,7 @@ static int sata_fsl_probe(struct of_device *ofdev, | |||
1332 | host_priv->ssr_base = ssr_base; | 1332 | host_priv->ssr_base = ssr_base; |
1333 | host_priv->csr_base = csr_base; | 1333 | host_priv->csr_base = csr_base; |
1334 | 1334 | ||
1335 | irq = irq_of_parse_and_map(ofdev->node, 0); | 1335 | irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
1336 | if (irq < 0) { | 1336 | if (irq < 0) { |
1337 | dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n"); | 1337 | dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n"); |
1338 | goto error_exit_with_cleanup; | 1338 | goto error_exit_with_cleanup; |
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 | ||
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 59ca2b77b574..52f2d11bc7b9 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
@@ -1004,7 +1004,7 @@ static const struct block_device_operations floppy_fops = { | |||
1004 | 1004 | ||
1005 | static int swim3_add_device(struct macio_dev *mdev, int index) | 1005 | static int swim3_add_device(struct macio_dev *mdev, int index) |
1006 | { | 1006 | { |
1007 | struct device_node *swim = mdev->ofdev.node; | 1007 | struct device_node *swim = mdev->ofdev.dev.of_node; |
1008 | struct floppy_state *fs = &floppy_states[index]; | 1008 | struct floppy_state *fs = &floppy_states[index]; |
1009 | int rc = -EBUSY; | 1009 | int rc = -EBUSY; |
1010 | 1010 | ||
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index e1c95e208a66..3094909b0613 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c | |||
@@ -1198,10 +1198,10 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1198 | dev_dbg(&op->dev, "ace_of_probe(%p, %p)\n", op, match); | 1198 | dev_dbg(&op->dev, "ace_of_probe(%p, %p)\n", op, match); |
1199 | 1199 | ||
1200 | /* device id */ | 1200 | /* device id */ |
1201 | id = of_get_property(op->node, "port-number", NULL); | 1201 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
1202 | 1202 | ||
1203 | /* physaddr */ | 1203 | /* physaddr */ |
1204 | rc = of_address_to_resource(op->node, 0, &res); | 1204 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
1205 | if (rc) { | 1205 | if (rc) { |
1206 | dev_err(&op->dev, "invalid address\n"); | 1206 | dev_err(&op->dev, "invalid address\n"); |
1207 | return rc; | 1207 | return rc; |
@@ -1209,11 +1209,11 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1209 | physaddr = res.start; | 1209 | physaddr = res.start; |
1210 | 1210 | ||
1211 | /* irq */ | 1211 | /* irq */ |
1212 | irq = irq_of_parse_and_map(op->node, 0); | 1212 | irq = irq_of_parse_and_map(op->dev.of_node, 0); |
1213 | 1213 | ||
1214 | /* bus width */ | 1214 | /* bus width */ |
1215 | bus_width = ACE_BUS_WIDTH_16; | 1215 | bus_width = ACE_BUS_WIDTH_16; |
1216 | if (of_find_property(op->node, "8-bit", NULL)) | 1216 | if (of_find_property(op->dev.of_node, "8-bit", NULL)) |
1217 | bus_width = ACE_BUS_WIDTH_8; | 1217 | bus_width = ACE_BUS_WIDTH_8; |
1218 | 1218 | ||
1219 | /* Call the bus-independant setup code */ | 1219 | /* Call the bus-independant setup code */ |
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index cc435be0bc13..451cd7071b1d 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
567 | struct disk_info *d; | 567 | struct disk_info *d; |
568 | struct cdrom_device_info *c; | 568 | struct cdrom_device_info *c; |
569 | struct request_queue *q; | 569 | struct request_queue *q; |
570 | struct device_node *node = vdev->dev.archdata.of_node; | 570 | struct device_node *node = vdev->dev.of_node; |
571 | 571 | ||
572 | deviceno = vdev->unit_address; | 572 | deviceno = vdev->unit_address; |
573 | if (deviceno >= VIOCD_MAX_CD) | 573 | if (deviceno >= VIOCD_MAX_CD) |
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index 10f868eefaa6..0861d99cd75b 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c | |||
@@ -660,7 +660,7 @@ static int __devinit n2rng_probe(struct of_device *op, | |||
660 | np->hvapi_major); | 660 | np->hvapi_major); |
661 | goto out_hvapi_unregister; | 661 | goto out_hvapi_unregister; |
662 | } | 662 | } |
663 | np->num_units = of_getintprop_default(op->node, | 663 | np->num_units = of_getintprop_default(op->dev.of_node, |
664 | "rng-#units", 0); | 664 | "rng-#units", 0); |
665 | if (!np->num_units) { | 665 | if (!np->num_units) { |
666 | dev_err(&op->dev, "VF RNG lacks rng-#units property\n"); | 666 | dev_err(&op->dev, "VF RNG lacks rng-#units property\n"); |
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index 7fa61dd1d9d9..b213855bae68 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c | |||
@@ -98,7 +98,7 @@ static int __devinit rng_probe(struct of_device *ofdev, | |||
98 | const struct of_device_id *match) | 98 | const struct of_device_id *match) |
99 | { | 99 | { |
100 | void __iomem *rng_regs; | 100 | void __iomem *rng_regs; |
101 | struct device_node *rng_np = ofdev->node; | 101 | struct device_node *rng_np = ofdev->dev.of_node; |
102 | struct resource res; | 102 | struct resource res; |
103 | int err = 0; | 103 | int err = 0; |
104 | 104 | ||
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 4462b113ba3f..2b44a0e1b988 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2469,7 +2469,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
2469 | struct smi_info *info; | 2469 | struct smi_info *info; |
2470 | struct resource resource; | 2470 | struct resource resource; |
2471 | const int *regsize, *regspacing, *regshift; | 2471 | const int *regsize, *regspacing, *regshift; |
2472 | struct device_node *np = dev->node; | 2472 | struct device_node *np = dev->dev.of_node; |
2473 | int ret; | 2473 | int ret; |
2474 | int proplen; | 2474 | int proplen; |
2475 | 2475 | ||
@@ -2525,7 +2525,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
2525 | info->io.regspacing = regspacing ? *regspacing : DEFAULT_REGSPACING; | 2525 | info->io.regspacing = regspacing ? *regspacing : DEFAULT_REGSPACING; |
2526 | info->io.regshift = regshift ? *regshift : 0; | 2526 | info->io.regshift = regshift ? *regshift : 0; |
2527 | 2527 | ||
2528 | info->irq = irq_of_parse_and_map(dev->node, 0); | 2528 | info->irq = irq_of_parse_and_map(dev->dev.of_node, 0); |
2529 | info->dev = &dev->dev; | 2529 | info->dev = &dev->dev; |
2530 | 2530 | ||
2531 | dev_dbg(&dev->dev, "addr 0x%lx regsize %d spacing %d irq %x\n", | 2531 | dev_dbg(&dev->dev, "addr 0x%lx regsize %d spacing %d irq %x\n", |
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 1144a04cda6e..42f7fa442ff8 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
@@ -866,7 +866,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
866 | { | 866 | { |
867 | int i = vdev->unit_address; | 867 | int i = vdev->unit_address; |
868 | int j; | 868 | int j; |
869 | struct device_node *node = vdev->dev.archdata.of_node; | 869 | struct device_node *node = vdev->dev.of_node; |
870 | 870 | ||
871 | if (i >= VIOTAPE_MAX_TAPE) | 871 | if (i >= VIOTAPE_MAX_TAPE) |
872 | return -ENODEV; | 872 | return -ENODEV; |
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 7261b8d9087c..5a0a31e2029c 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c | |||
@@ -772,18 +772,18 @@ hwicap_of_probe(struct of_device *op, const struct of_device_id *match) | |||
772 | 772 | ||
773 | dev_dbg(&op->dev, "hwicap_of_probe(%p, %p)\n", op, match); | 773 | dev_dbg(&op->dev, "hwicap_of_probe(%p, %p)\n", op, match); |
774 | 774 | ||
775 | rc = of_address_to_resource(op->node, 0, &res); | 775 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
776 | if (rc) { | 776 | if (rc) { |
777 | dev_err(&op->dev, "invalid address\n"); | 777 | dev_err(&op->dev, "invalid address\n"); |
778 | return rc; | 778 | return rc; |
779 | } | 779 | } |
780 | 780 | ||
781 | id = of_get_property(op->node, "port-number", NULL); | 781 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
782 | 782 | ||
783 | /* It's most likely that we're using V4, if the family is not | 783 | /* It's most likely that we're using V4, if the family is not |
784 | specified */ | 784 | specified */ |
785 | regs = &v4_config_registers; | 785 | regs = &v4_config_registers; |
786 | family = of_get_property(op->node, "xlnx,family", NULL); | 786 | family = of_get_property(op->dev.of_node, "xlnx,family", NULL); |
787 | 787 | ||
788 | if (family) { | 788 | if (family) { |
789 | if (!strcmp(family, "virtex2p")) { | 789 | if (!strcmp(family, "virtex2p")) { |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index dc558a097311..5a02f3482dba 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -1807,7 +1807,7 @@ static int talitos_probe(struct of_device *ofdev, | |||
1807 | const struct of_device_id *match) | 1807 | const struct of_device_id *match) |
1808 | { | 1808 | { |
1809 | struct device *dev = &ofdev->dev; | 1809 | struct device *dev = &ofdev->dev; |
1810 | struct device_node *np = ofdev->node; | 1810 | struct device_node *np = ofdev->dev.of_node; |
1811 | struct talitos_private *priv; | 1811 | struct talitos_private *priv; |
1812 | const unsigned int *prop; | 1812 | const unsigned int *prop; |
1813 | int i, err; | 1813 | int i, err; |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 88f470f0d820..0e376eb37417 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -1313,7 +1313,7 @@ static int __devinit fsldma_of_probe(struct of_device *op, | |||
1313 | INIT_LIST_HEAD(&fdev->common.channels); | 1313 | INIT_LIST_HEAD(&fdev->common.channels); |
1314 | 1314 | ||
1315 | /* ioremap the registers for use */ | 1315 | /* ioremap the registers for use */ |
1316 | fdev->regs = of_iomap(op->node, 0); | 1316 | fdev->regs = of_iomap(op->dev.of_node, 0); |
1317 | if (!fdev->regs) { | 1317 | if (!fdev->regs) { |
1318 | dev_err(&op->dev, "unable to ioremap registers\n"); | 1318 | dev_err(&op->dev, "unable to ioremap registers\n"); |
1319 | err = -ENOMEM; | 1319 | err = -ENOMEM; |
@@ -1321,7 +1321,7 @@ static int __devinit fsldma_of_probe(struct of_device *op, | |||
1321 | } | 1321 | } |
1322 | 1322 | ||
1323 | /* map the channel IRQ if it exists, but don't hookup the handler yet */ | 1323 | /* map the channel IRQ if it exists, but don't hookup the handler yet */ |
1324 | fdev->irq = irq_of_parse_and_map(op->node, 0); | 1324 | fdev->irq = irq_of_parse_and_map(op->dev.of_node, 0); |
1325 | 1325 | ||
1326 | dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask); | 1326 | dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask); |
1327 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); | 1327 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); |
@@ -1343,7 +1343,7 @@ static int __devinit fsldma_of_probe(struct of_device *op, | |||
1343 | * of_platform_bus_remove(). Instead, we manually instantiate every DMA | 1343 | * of_platform_bus_remove(). Instead, we manually instantiate every DMA |
1344 | * channel object. | 1344 | * channel object. |
1345 | */ | 1345 | */ |
1346 | for_each_child_of_node(op->node, child) { | 1346 | for_each_child_of_node(op->dev.of_node, child) { |
1347 | if (of_device_is_compatible(child, "fsl,eloplus-dma-channel")) { | 1347 | if (of_device_is_compatible(child, "fsl,eloplus-dma-channel")) { |
1348 | fsl_dma_chan_probe(fdev, child, | 1348 | fsl_dma_chan_probe(fdev, child, |
1349 | FSL_DMA_IP_85XX | FSL_DMA_BIG_ENDIAN, | 1349 | FSL_DMA_IP_85XX | FSL_DMA_BIG_ENDIAN, |
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 7d521e1d17e1..1db114b09990 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -437,7 +437,7 @@ pca953x_get_alt_pdata(struct i2c_client *client) | |||
437 | struct device_node *node; | 437 | struct device_node *node; |
438 | const uint16_t *val; | 438 | const uint16_t *val; |
439 | 439 | ||
440 | node = dev_archdata_get_node(&client->dev.archdata); | 440 | node = client->dev.of_node; |
441 | if (node == NULL) | 441 | if (node == NULL) |
442 | return NULL; | 442 | return NULL; |
443 | 443 | ||
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index 9c2e10082b79..48d2c1a0d4ce 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
@@ -440,7 +440,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
440 | 440 | ||
441 | init_waitqueue_head(&cpm->i2c_wait); | 441 | init_waitqueue_head(&cpm->i2c_wait); |
442 | 442 | ||
443 | cpm->irq = of_irq_to_resource(ofdev->node, 0, NULL); | 443 | cpm->irq = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
444 | if (cpm->irq == NO_IRQ) | 444 | if (cpm->irq == NO_IRQ) |
445 | return -EINVAL; | 445 | return -EINVAL; |
446 | 446 | ||
@@ -451,13 +451,13 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
451 | return ret; | 451 | return ret; |
452 | 452 | ||
453 | /* I2C parameter RAM */ | 453 | /* I2C parameter RAM */ |
454 | i2c_base = of_iomap(ofdev->node, 1); | 454 | i2c_base = of_iomap(ofdev->dev.of_node, 1); |
455 | if (i2c_base == NULL) { | 455 | if (i2c_base == NULL) { |
456 | ret = -EINVAL; | 456 | ret = -EINVAL; |
457 | goto out_irq; | 457 | goto out_irq; |
458 | } | 458 | } |
459 | 459 | ||
460 | if (of_device_is_compatible(ofdev->node, "fsl,cpm1-i2c")) { | 460 | if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm1-i2c")) { |
461 | 461 | ||
462 | /* Check for and use a microcode relocation patch. */ | 462 | /* Check for and use a microcode relocation patch. */ |
463 | cpm->i2c_ram = i2c_base; | 463 | cpm->i2c_ram = i2c_base; |
@@ -474,7 +474,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
474 | 474 | ||
475 | cpm->version = 1; | 475 | cpm->version = 1; |
476 | 476 | ||
477 | } else if (of_device_is_compatible(ofdev->node, "fsl,cpm2-i2c")) { | 477 | } else if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm2-i2c")) { |
478 | cpm->i2c_addr = cpm_muram_alloc(sizeof(struct i2c_ram), 64); | 478 | cpm->i2c_addr = cpm_muram_alloc(sizeof(struct i2c_ram), 64); |
479 | cpm->i2c_ram = cpm_muram_addr(cpm->i2c_addr); | 479 | cpm->i2c_ram = cpm_muram_addr(cpm->i2c_addr); |
480 | out_be16(i2c_base, cpm->i2c_addr); | 480 | out_be16(i2c_base, cpm->i2c_addr); |
@@ -489,24 +489,24 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
489 | } | 489 | } |
490 | 490 | ||
491 | /* I2C control/status registers */ | 491 | /* I2C control/status registers */ |
492 | cpm->i2c_reg = of_iomap(ofdev->node, 0); | 492 | cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0); |
493 | if (cpm->i2c_reg == NULL) { | 493 | if (cpm->i2c_reg == NULL) { |
494 | ret = -EINVAL; | 494 | ret = -EINVAL; |
495 | goto out_ram; | 495 | goto out_ram; |
496 | } | 496 | } |
497 | 497 | ||
498 | data = of_get_property(ofdev->node, "fsl,cpm-command", &len); | 498 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); |
499 | if (!data || len != 4) { | 499 | if (!data || len != 4) { |
500 | ret = -EINVAL; | 500 | ret = -EINVAL; |
501 | goto out_reg; | 501 | goto out_reg; |
502 | } | 502 | } |
503 | cpm->cp_command = *data; | 503 | cpm->cp_command = *data; |
504 | 504 | ||
505 | data = of_get_property(ofdev->node, "linux,i2c-class", &len); | 505 | data = of_get_property(ofdev->dev.of_node, "linux,i2c-class", &len); |
506 | if (data && len == 4) | 506 | if (data && len == 4) |
507 | cpm->adap.class = *data; | 507 | cpm->adap.class = *data; |
508 | 508 | ||
509 | data = of_get_property(ofdev->node, "clock-frequency", &len); | 509 | data = of_get_property(ofdev->dev.of_node, "clock-frequency", &len); |
510 | if (data && len == 4) | 510 | if (data && len == 4) |
511 | cpm->freq = *data; | 511 | cpm->freq = *data; |
512 | else | 512 | else |
@@ -661,7 +661,7 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev, | |||
661 | 661 | ||
662 | /* register new adapter to i2c module... */ | 662 | /* register new adapter to i2c module... */ |
663 | 663 | ||
664 | data = of_get_property(ofdev->node, "linux,i2c-index", &len); | 664 | data = of_get_property(ofdev->dev.of_node, "linux,i2c-index", &len); |
665 | if (data && len == 4) { | 665 | if (data && len == 4) { |
666 | cpm->adap.nr = *data; | 666 | cpm->adap.nr = *data; |
667 | result = i2c_add_numbered_adapter(&cpm->adap); | 667 | result = i2c_add_numbered_adapter(&cpm->adap); |
@@ -679,7 +679,7 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev, | |||
679 | /* | 679 | /* |
680 | * register OF I2C devices | 680 | * register OF I2C devices |
681 | */ | 681 | */ |
682 | of_register_i2c_devices(&cpm->adap, ofdev->node); | 682 | of_register_i2c_devices(&cpm->adap, ofdev->dev.of_node); |
683 | 683 | ||
684 | return 0; | 684 | return 0; |
685 | out_shut: | 685 | out_shut: |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index b1bc6e277d2a..e66dc83953c5 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
@@ -664,7 +664,7 @@ static inline u8 iic_clckdiv(unsigned int opb) | |||
664 | static int __devinit iic_request_irq(struct of_device *ofdev, | 664 | static int __devinit iic_request_irq(struct of_device *ofdev, |
665 | struct ibm_iic_private *dev) | 665 | struct ibm_iic_private *dev) |
666 | { | 666 | { |
667 | struct device_node *np = ofdev->node; | 667 | struct device_node *np = ofdev->dev.of_node; |
668 | int irq; | 668 | int irq; |
669 | 669 | ||
670 | if (iic_force_poll) | 670 | if (iic_force_poll) |
@@ -695,7 +695,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev, | |||
695 | static int __devinit iic_probe(struct of_device *ofdev, | 695 | static int __devinit iic_probe(struct of_device *ofdev, |
696 | const struct of_device_id *match) | 696 | const struct of_device_id *match) |
697 | { | 697 | { |
698 | struct device_node *np = ofdev->node; | 698 | struct device_node *np = ofdev->dev.of_node; |
699 | struct ibm_iic_private *dev; | 699 | struct ibm_iic_private *dev; |
700 | struct i2c_adapter *adap; | 700 | struct i2c_adapter *adap; |
701 | const u32 *freq; | 701 | const u32 *freq; |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index f1321f763789..69473b6c260c 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -560,14 +560,14 @@ static int __devinit fsl_i2c_probe(struct of_device *op, | |||
560 | 560 | ||
561 | init_waitqueue_head(&i2c->queue); | 561 | init_waitqueue_head(&i2c->queue); |
562 | 562 | ||
563 | i2c->base = of_iomap(op->node, 0); | 563 | i2c->base = of_iomap(op->dev.of_node, 0); |
564 | if (!i2c->base) { | 564 | if (!i2c->base) { |
565 | dev_err(i2c->dev, "failed to map controller\n"); | 565 | dev_err(i2c->dev, "failed to map controller\n"); |
566 | result = -ENOMEM; | 566 | result = -ENOMEM; |
567 | goto fail_map; | 567 | goto fail_map; |
568 | } | 568 | } |
569 | 569 | ||
570 | i2c->irq = irq_of_parse_and_map(op->node, 0); | 570 | i2c->irq = irq_of_parse_and_map(op->dev.of_node, 0); |
571 | if (i2c->irq != NO_IRQ) { /* i2c->irq = NO_IRQ implies polling */ | 571 | if (i2c->irq != NO_IRQ) { /* i2c->irq = NO_IRQ implies polling */ |
572 | result = request_irq(i2c->irq, mpc_i2c_isr, | 572 | result = request_irq(i2c->irq, mpc_i2c_isr, |
573 | IRQF_SHARED, "i2c-mpc", i2c); | 573 | IRQF_SHARED, "i2c-mpc", i2c); |
@@ -577,21 +577,22 @@ static int __devinit fsl_i2c_probe(struct of_device *op, | |||
577 | } | 577 | } |
578 | } | 578 | } |
579 | 579 | ||
580 | if (of_get_property(op->node, "fsl,preserve-clocking", NULL)) { | 580 | if (of_get_property(op->dev.of_node, "fsl,preserve-clocking", NULL)) { |
581 | clock = MPC_I2C_CLOCK_PRESERVE; | 581 | clock = MPC_I2C_CLOCK_PRESERVE; |
582 | } else { | 582 | } else { |
583 | prop = of_get_property(op->node, "clock-frequency", &plen); | 583 | prop = of_get_property(op->dev.of_node, "clock-frequency", |
584 | &plen); | ||
584 | if (prop && plen == sizeof(u32)) | 585 | if (prop && plen == sizeof(u32)) |
585 | clock = *prop; | 586 | clock = *prop; |
586 | } | 587 | } |
587 | 588 | ||
588 | if (match->data) { | 589 | if (match->data) { |
589 | struct mpc_i2c_data *data = match->data; | 590 | struct mpc_i2c_data *data = match->data; |
590 | data->setup(op->node, i2c, clock, data->prescaler); | 591 | data->setup(op->dev.of_node, i2c, clock, data->prescaler); |
591 | } else { | 592 | } else { |
592 | /* Backwards compatibility */ | 593 | /* Backwards compatibility */ |
593 | if (of_get_property(op->node, "dfsrr", NULL)) | 594 | if (of_get_property(op->dev.of_node, "dfsrr", NULL)) |
594 | mpc_i2c_setup_8xxx(op->node, i2c, clock, 0); | 595 | mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock, 0); |
595 | } | 596 | } |
596 | 597 | ||
597 | dev_set_drvdata(&op->dev, i2c); | 598 | dev_set_drvdata(&op->dev, i2c); |
@@ -605,7 +606,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op, | |||
605 | dev_err(i2c->dev, "failed to add adapter\n"); | 606 | dev_err(i2c->dev, "failed to add adapter\n"); |
606 | goto fail_add; | 607 | goto fail_add; |
607 | } | 608 | } |
608 | of_register_i2c_devices(&i2c->adap, op->node); | 609 | of_register_i2c_devices(&i2c->adap, op->dev.of_node); |
609 | 610 | ||
610 | return result; | 611 | return result; |
611 | 612 | ||
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 159955d16c47..183fa38760d8 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
@@ -1153,7 +1153,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1153 | 1153 | ||
1154 | if (macio_resource_count(mdev) == 0) { | 1154 | if (macio_resource_count(mdev) == 0) { |
1155 | printk(KERN_WARNING "ide-pmac: no address for %s\n", | 1155 | printk(KERN_WARNING "ide-pmac: no address for %s\n", |
1156 | mdev->ofdev.node->full_name); | 1156 | mdev->ofdev.dev.of_node->full_name); |
1157 | rc = -ENXIO; | 1157 | rc = -ENXIO; |
1158 | goto out_free_pmif; | 1158 | goto out_free_pmif; |
1159 | } | 1159 | } |
@@ -1161,7 +1161,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1161 | /* Request memory resource for IO ports */ | 1161 | /* Request memory resource for IO ports */ |
1162 | if (macio_request_resource(mdev, 0, "ide-pmac (ports)")) { | 1162 | if (macio_request_resource(mdev, 0, "ide-pmac (ports)")) { |
1163 | printk(KERN_ERR "ide-pmac: can't request MMIO resource for " | 1163 | printk(KERN_ERR "ide-pmac: can't request MMIO resource for " |
1164 | "%s!\n", mdev->ofdev.node->full_name); | 1164 | "%s!\n", mdev->ofdev.dev.of_node->full_name); |
1165 | rc = -EBUSY; | 1165 | rc = -EBUSY; |
1166 | goto out_free_pmif; | 1166 | goto out_free_pmif; |
1167 | } | 1167 | } |
@@ -1173,7 +1173,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1173 | */ | 1173 | */ |
1174 | if (macio_irq_count(mdev) == 0) { | 1174 | if (macio_irq_count(mdev) == 0) { |
1175 | printk(KERN_WARNING "ide-pmac: no intrs for device %s, using " | 1175 | printk(KERN_WARNING "ide-pmac: no intrs for device %s, using " |
1176 | "13\n", mdev->ofdev.node->full_name); | 1176 | "13\n", mdev->ofdev.dev.of_node->full_name); |
1177 | irq = irq_create_mapping(NULL, 13); | 1177 | irq = irq_create_mapping(NULL, 13); |
1178 | } else | 1178 | } else |
1179 | irq = macio_irq(mdev, 0); | 1179 | irq = macio_irq(mdev, 0); |
@@ -1182,7 +1182,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1182 | regbase = (unsigned long) base; | 1182 | regbase = (unsigned long) base; |
1183 | 1183 | ||
1184 | pmif->mdev = mdev; | 1184 | pmif->mdev = mdev; |
1185 | pmif->node = mdev->ofdev.node; | 1185 | pmif->node = mdev->ofdev.dev.of_node; |
1186 | pmif->regbase = regbase; | 1186 | pmif->regbase = regbase; |
1187 | pmif->irq = irq; | 1187 | pmif->irq = irq; |
1188 | pmif->kauai_fcr = NULL; | 1188 | pmif->kauai_fcr = NULL; |
@@ -1191,7 +1191,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1191 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) | 1191 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) |
1192 | printk(KERN_WARNING "ide-pmac: can't request DMA " | 1192 | printk(KERN_WARNING "ide-pmac: can't request DMA " |
1193 | "resource for %s!\n", | 1193 | "resource for %s!\n", |
1194 | mdev->ofdev.node->full_name); | 1194 | mdev->ofdev.dev.of_node->full_name); |
1195 | else | 1195 | else |
1196 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); | 1196 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); |
1197 | } else | 1197 | } else |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 129a6bebd6e3..26391853277f 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -291,8 +291,9 @@ static int ehca_sense_attributes(struct ehca_shca *shca) | |||
291 | }; | 291 | }; |
292 | 292 | ||
293 | ehca_gen_dbg("Probing adapter %s...", | 293 | ehca_gen_dbg("Probing adapter %s...", |
294 | shca->ofdev->node->full_name); | 294 | shca->ofdev->dev.of_node->full_name); |
295 | loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL); | 295 | loc_code = of_get_property(shca->ofdev->dev.of_node, "ibm,loc-code", |
296 | NULL); | ||
296 | if (loc_code) | 297 | if (loc_code) |
297 | ehca_gen_dbg(" ... location lode=%s", loc_code); | 298 | ehca_gen_dbg(" ... location lode=%s", loc_code); |
298 | 299 | ||
@@ -720,16 +721,16 @@ static int __devinit ehca_probe(struct of_device *dev, | |||
720 | int ret, i, eq_size; | 721 | int ret, i, eq_size; |
721 | unsigned long flags; | 722 | unsigned long flags; |
722 | 723 | ||
723 | handle = of_get_property(dev->node, "ibm,hca-handle", NULL); | 724 | handle = of_get_property(dev->dev.of_node, "ibm,hca-handle", NULL); |
724 | if (!handle) { | 725 | if (!handle) { |
725 | ehca_gen_err("Cannot get eHCA handle for adapter: %s.", | 726 | ehca_gen_err("Cannot get eHCA handle for adapter: %s.", |
726 | dev->node->full_name); | 727 | dev->dev.of_node->full_name); |
727 | return -ENODEV; | 728 | return -ENODEV; |
728 | } | 729 | } |
729 | 730 | ||
730 | if (!(*handle)) { | 731 | if (!(*handle)) { |
731 | ehca_gen_err("Wrong eHCA handle for adapter: %s.", | 732 | ehca_gen_err("Wrong eHCA handle for adapter: %s.", |
732 | dev->node->full_name); | 733 | dev->dev.of_node->full_name); |
733 | return -ENODEV; | 734 | return -ENODEV; |
734 | } | 735 | } |
735 | 736 | ||
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 5071af2c0604..29e17698b2a4 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h | |||
@@ -51,7 +51,7 @@ static inline void i8042_write_command(int val) | |||
51 | 51 | ||
52 | static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) | 52 | static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) |
53 | { | 53 | { |
54 | struct device_node *dp = op->node; | 54 | struct device_node *dp = op->dev.of_node; |
55 | 55 | ||
56 | dp = dp->child; | 56 | dp = dp->child; |
57 | while (dp) { | 57 | while (dp) { |
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index f84f8e32e3f1..7a288c0ef1a6 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -244,17 +244,17 @@ static int __devinit xps2_of_probe(struct of_device *ofdev, | |||
244 | int error; | 244 | int error; |
245 | 245 | ||
246 | dev_info(dev, "Device Tree Probing \'%s\'\n", | 246 | dev_info(dev, "Device Tree Probing \'%s\'\n", |
247 | ofdev->node->name); | 247 | ofdev->dev.of_node->name); |
248 | 248 | ||
249 | /* Get iospace for the device */ | 249 | /* Get iospace for the device */ |
250 | error = of_address_to_resource(ofdev->node, 0, &r_mem); | 250 | error = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem); |
251 | if (error) { | 251 | if (error) { |
252 | dev_err(dev, "invalid address\n"); | 252 | dev_err(dev, "invalid address\n"); |
253 | return error; | 253 | return error; |
254 | } | 254 | } |
255 | 255 | ||
256 | /* Get IRQ for the device */ | 256 | /* Get IRQ for the device */ |
257 | if (of_irq_to_resource(ofdev->node, 0, &r_irq) == NO_IRQ) { | 257 | if (of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq) == NO_IRQ) { |
258 | dev_err(dev, "no IRQ found\n"); | 258 | dev_err(dev, "no IRQ found\n"); |
259 | return -ENODEV; | 259 | return -ENODEV; |
260 | } | 260 | } |
@@ -342,7 +342,7 @@ static int __devexit xps2_of_remove(struct of_device *of_dev) | |||
342 | iounmap(drvdata->base_address); | 342 | iounmap(drvdata->base_address); |
343 | 343 | ||
344 | /* Get iospace of the device */ | 344 | /* Get iospace of the device */ |
345 | if (of_address_to_resource(of_dev->node, 0, &r_mem)) | 345 | if (of_address_to_resource(of_dev->dev.of_node, 0, &r_mem)) |
346 | dev_err(dev, "invalid address\n"); | 346 | dev_err(dev, "invalid address\n"); |
347 | else | 347 | else |
348 | release_mem_region(r_mem.start, resource_size(&r_mem)); | 348 | release_mem_region(r_mem.start, resource_size(&r_mem)); |
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index c6e4b772b757..a77a23e783db 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c | |||
@@ -211,7 +211,7 @@ struct gpio_led_of_platform_data { | |||
211 | static int __devinit of_gpio_leds_probe(struct of_device *ofdev, | 211 | static int __devinit of_gpio_leds_probe(struct of_device *ofdev, |
212 | const struct of_device_id *match) | 212 | const struct of_device_id *match) |
213 | { | 213 | { |
214 | struct device_node *np = ofdev->node, *child; | 214 | struct device_node *np = ofdev->dev.of_node, *child; |
215 | struct gpio_led_of_platform_data *pdata; | 215 | struct gpio_led_of_platform_data *pdata; |
216 | int count = 0, ret; | 216 | int count = 0, ret; |
217 | 217 | ||
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 26a303a1d1ab..67fe13ffe90b 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -248,7 +248,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, int index, | |||
248 | 248 | ||
249 | static void macio_add_missing_resources(struct macio_dev *dev) | 249 | static void macio_add_missing_resources(struct macio_dev *dev) |
250 | { | 250 | { |
251 | struct device_node *np = dev->ofdev.node; | 251 | struct device_node *np = dev->ofdev.dev.of_node; |
252 | unsigned int irq_base; | 252 | unsigned int irq_base; |
253 | 253 | ||
254 | /* Gatwick has some missing interrupts on child nodes */ | 254 | /* Gatwick has some missing interrupts on child nodes */ |
@@ -289,7 +289,7 @@ static void macio_add_missing_resources(struct macio_dev *dev) | |||
289 | 289 | ||
290 | static void macio_setup_interrupts(struct macio_dev *dev) | 290 | static void macio_setup_interrupts(struct macio_dev *dev) |
291 | { | 291 | { |
292 | struct device_node *np = dev->ofdev.node; | 292 | struct device_node *np = dev->ofdev.dev.of_node; |
293 | unsigned int irq; | 293 | unsigned int irq; |
294 | int i = 0, j = 0; | 294 | int i = 0, j = 0; |
295 | 295 | ||
@@ -317,7 +317,7 @@ static void macio_setup_interrupts(struct macio_dev *dev) | |||
317 | static void macio_setup_resources(struct macio_dev *dev, | 317 | static void macio_setup_resources(struct macio_dev *dev, |
318 | struct resource *parent_res) | 318 | struct resource *parent_res) |
319 | { | 319 | { |
320 | struct device_node *np = dev->ofdev.node; | 320 | struct device_node *np = dev->ofdev.dev.of_node; |
321 | struct resource r; | 321 | struct resource r; |
322 | int index; | 322 | int index; |
323 | 323 | ||
@@ -373,7 +373,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
373 | 373 | ||
374 | dev->bus = &chip->lbus; | 374 | dev->bus = &chip->lbus; |
375 | dev->media_bay = in_bay; | 375 | dev->media_bay = in_bay; |
376 | dev->ofdev.node = np; | 376 | dev->ofdev.dev.of_node = np; |
377 | dev->ofdev.dma_mask = 0xffffffffUL; | 377 | dev->ofdev.dma_mask = 0xffffffffUL; |
378 | dev->ofdev.dev.dma_mask = &dev->ofdev.dma_mask; | 378 | dev->ofdev.dev.dma_mask = &dev->ofdev.dma_mask; |
379 | dev->ofdev.dev.parent = parent; | 379 | dev->ofdev.dev.parent = parent; |
@@ -494,9 +494,9 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
494 | } | 494 | } |
495 | 495 | ||
496 | /* Add media bay devices if any */ | 496 | /* Add media bay devices if any */ |
497 | pnode = mbdev->ofdev.dev.of_node; | ||
497 | if (mbdev) | 498 | if (mbdev) |
498 | for (np = NULL; (np = of_get_next_child(mbdev->ofdev.node, np)) | 499 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { |
499 | != NULL;) { | ||
500 | if (macio_skip_device(np)) | 500 | if (macio_skip_device(np)) |
501 | continue; | 501 | continue; |
502 | of_node_get(np); | 502 | of_node_get(np); |
@@ -506,9 +506,9 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
506 | } | 506 | } |
507 | 507 | ||
508 | /* Add serial ports if any */ | 508 | /* Add serial ports if any */ |
509 | pnode = sdev->ofdev.dev.of_node; | ||
509 | if (sdev) { | 510 | if (sdev) { |
510 | for (np = NULL; (np = of_get_next_child(sdev->ofdev.node, np)) | 511 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { |
511 | != NULL;) { | ||
512 | if (macio_skip_device(np)) | 512 | if (macio_skip_device(np)) |
513 | continue; | 513 | continue; |
514 | of_node_get(np); | 514 | of_node_get(np); |
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index 9e9453b58425..6999ce59fd10 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c | |||
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ | |||
9 | char *buf) \ | 9 | char *buf) \ |
10 | { \ | 10 | { \ |
11 | struct macio_dev *mdev = to_macio_device (dev); \ | 11 | struct macio_dev *mdev = to_macio_device (dev); \ |
12 | return sprintf (buf, format_string, mdev->ofdev.node->field); \ | 12 | return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ |
13 | } | 13 | } |
14 | 14 | ||
15 | static ssize_t | 15 | static ssize_t |
@@ -21,7 +21,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf) | |||
21 | int length = 0; | 21 | int length = 0; |
22 | 22 | ||
23 | of = &to_macio_device (dev)->ofdev; | 23 | of = &to_macio_device (dev)->ofdev; |
24 | compat = of_get_property(of->node, "compatible", &cplen); | 24 | compat = of_get_property(of->dev.of_node, "compatible", &cplen); |
25 | if (!compat) { | 25 | if (!compat) { |
26 | *buf = '\0'; | 26 | *buf = '\0'; |
27 | return 0; | 27 | return 0; |
@@ -58,7 +58,7 @@ static ssize_t devspec_show(struct device *dev, | |||
58 | struct of_device *ofdev; | 58 | struct of_device *ofdev; |
59 | 59 | ||
60 | ofdev = to_of_device(dev); | 60 | ofdev = to_of_device(dev); |
61 | return sprintf(buf, "%s\n", ofdev->node->full_name); | 61 | return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); |
62 | } | 62 | } |
63 | 63 | ||
64 | macio_config_of_attr (name, "%s\n"); | 64 | macio_config_of_attr (name, "%s\n"); |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 08002b88f342..288acce76b74 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -564,7 +564,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de | |||
564 | unsigned long base; | 564 | unsigned long base; |
565 | int i; | 565 | int i; |
566 | 566 | ||
567 | ofnode = mdev->ofdev.node; | 567 | ofnode = mdev->ofdev.dev.of_node; |
568 | 568 | ||
569 | if (macio_resource_count(mdev) < 1) | 569 | if (macio_resource_count(mdev) < 1) |
570 | return -ENODEV; | 570 | return -ENODEV; |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 7c54d80c4fb2..12946c5f583f 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -375,7 +375,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev, | |||
375 | pr_debug("rackmeter_probe()\n"); | 375 | pr_debug("rackmeter_probe()\n"); |
376 | 376 | ||
377 | /* Get i2s-a node */ | 377 | /* Get i2s-a node */ |
378 | while ((i2s = of_get_next_child(mdev->ofdev.node, i2s)) != NULL) | 378 | while ((i2s = of_get_next_child(mdev->ofdev.dev.of_node, i2s)) != NULL) |
379 | if (strcmp(i2s->name, "i2s-a") == 0) | 379 | if (strcmp(i2s->name, "i2s-a") == 0) |
380 | break; | 380 | break; |
381 | if (i2s == NULL) { | 381 | if (i2s == NULL) { |
@@ -431,7 +431,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev, | |||
431 | of_address_to_resource(i2s, 1, &rdma)) { | 431 | of_address_to_resource(i2s, 1, &rdma)) { |
432 | printk(KERN_ERR | 432 | printk(KERN_ERR |
433 | "rackmeter: found match but lacks resources: %s", | 433 | "rackmeter: found match but lacks resources: %s", |
434 | mdev->ofdev.node->full_name); | 434 | mdev->ofdev.dev.of_node->full_name); |
435 | rc = -ENXIO; | 435 | rc = -ENXIO; |
436 | goto bail_free; | 436 | goto bail_free; |
437 | } | 437 | } |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index b18fa948f3d1..9314be9a2fc8 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -2215,7 +2215,7 @@ static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match) | |||
2215 | state = state_detached; | 2215 | state = state_detached; |
2216 | 2216 | ||
2217 | /* Lookup the fans in the device tree */ | 2217 | /* Lookup the fans in the device tree */ |
2218 | fcu_lookup_fans(dev->node); | 2218 | fcu_lookup_fans(dev->dev.of_node); |
2219 | 2219 | ||
2220 | /* Add the driver */ | 2220 | /* Add the driver */ |
2221 | return i2c_add_driver(&therm_pm72_driver); | 2221 | return i2c_add_driver(&therm_pm72_driver); |
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index bb6cc54b558e..1247e5de9faa 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c | |||
@@ -64,7 +64,7 @@ static int of_mmc_spi_get_ro(struct device *dev) | |||
64 | struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) | 64 | struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) |
65 | { | 65 | { |
66 | struct device *dev = &spi->dev; | 66 | struct device *dev = &spi->dev; |
67 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 67 | struct device_node *np = dev->of_node; |
68 | struct of_mmc_spi *oms; | 68 | struct of_mmc_spi *oms; |
69 | const u32 *voltage_ranges; | 69 | const u32 *voltage_ranges; |
70 | int num_ranges; | 70 | int num_ranges; |
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(mmc_spi_get_pdata); | |||
135 | void mmc_spi_put_pdata(struct spi_device *spi) | 135 | void mmc_spi_put_pdata(struct spi_device *spi) |
136 | { | 136 | { |
137 | struct device *dev = &spi->dev; | 137 | struct device *dev = &spi->dev; |
138 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 138 | struct device_node *np = dev->of_node; |
139 | struct of_mmc_spi *oms = to_of_mmc_spi(dev); | 139 | struct of_mmc_spi *oms = to_of_mmc_spi(dev); |
140 | int i; | 140 | int i; |
141 | 141 | ||
diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c index 55e33135edb4..dfe5ceae6794 100644 --- a/drivers/mmc/host/sdhci-of-core.c +++ b/drivers/mmc/host/sdhci-of-core.c | |||
@@ -118,7 +118,7 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np) | |||
118 | static int __devinit sdhci_of_probe(struct of_device *ofdev, | 118 | static int __devinit sdhci_of_probe(struct of_device *ofdev, |
119 | const struct of_device_id *match) | 119 | const struct of_device_id *match) |
120 | { | 120 | { |
121 | struct device_node *np = ofdev->node; | 121 | struct device_node *np = ofdev->dev.of_node; |
122 | struct sdhci_of_data *sdhci_of_data = match->data; | 122 | struct sdhci_of_data *sdhci_of_data = match->data; |
123 | struct sdhci_host *host; | 123 | struct sdhci_host *host; |
124 | struct sdhci_of_host *of_host; | 124 | struct sdhci_of_host *of_host; |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 101ee6ead05c..3dc7a2fbf025 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -143,7 +143,7 @@ static int of_flash_remove(struct of_device *dev) | |||
143 | static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, | 143 | static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, |
144 | struct map_info *map) | 144 | struct map_info *map) |
145 | { | 145 | { |
146 | struct device_node *dp = dev->node; | 146 | struct device_node *dp = dev->dev.of_node; |
147 | const char *of_probe; | 147 | const char *of_probe; |
148 | struct mtd_info *mtd; | 148 | struct mtd_info *mtd; |
149 | static const char *rom_probe_types[] | 149 | static const char *rom_probe_types[] |
@@ -180,7 +180,7 @@ static int __devinit of_flash_probe(struct of_device *dev, | |||
180 | static const char *part_probe_types[] | 180 | static const char *part_probe_types[] |
181 | = { "cmdlinepart", "RedBoot", NULL }; | 181 | = { "cmdlinepart", "RedBoot", NULL }; |
182 | #endif | 182 | #endif |
183 | struct device_node *dp = dev->node; | 183 | struct device_node *dp = dev->dev.of_node; |
184 | struct resource res; | 184 | struct resource res; |
185 | struct of_flash *info; | 185 | struct of_flash *info; |
186 | const char *probe_type = match->data; | 186 | const char *probe_type = match->data; |
@@ -204,7 +204,7 @@ static int __devinit of_flash_probe(struct of_device *dev, | |||
204 | p = of_get_property(dp, "reg", &count); | 204 | p = of_get_property(dp, "reg", &count); |
205 | if (count % reg_tuple_size != 0) { | 205 | if (count % reg_tuple_size != 0) { |
206 | dev_err(&dev->dev, "Malformed reg property on %s\n", | 206 | dev_err(&dev->dev, "Malformed reg property on %s\n", |
207 | dev->node->full_name); | 207 | dev->dev.of_node->full_name); |
208 | err = -EINVAL; | 208 | err = -EINVAL; |
209 | goto err_flash_remove; | 209 | goto err_flash_remove; |
210 | } | 210 | } |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index fadc4c45b455..5945a23e681f 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -110,7 +110,7 @@ int uflash_devinit(struct of_device *op, struct device_node *dp) | |||
110 | 110 | ||
111 | static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match) | 111 | static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match) |
112 | { | 112 | { |
113 | struct device_node *dp = op->node; | 113 | struct device_node *dp = op->dev.of_node; |
114 | 114 | ||
115 | /* Flashprom must have the "user" property in order to | 115 | /* Flashprom must have the "user" property in order to |
116 | * be used by this driver. | 116 | * be used by this driver. |
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index ae30fb6eed97..4a6079588ab2 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
@@ -1030,14 +1030,14 @@ static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev, | |||
1030 | init_waitqueue_head(&ctrl->controller.wq); | 1030 | init_waitqueue_head(&ctrl->controller.wq); |
1031 | init_waitqueue_head(&ctrl->irq_wait); | 1031 | init_waitqueue_head(&ctrl->irq_wait); |
1032 | 1032 | ||
1033 | ctrl->regs = of_iomap(ofdev->node, 0); | 1033 | ctrl->regs = of_iomap(ofdev->dev.of_node, 0); |
1034 | if (!ctrl->regs) { | 1034 | if (!ctrl->regs) { |
1035 | dev_err(&ofdev->dev, "failed to get memory region\n"); | 1035 | dev_err(&ofdev->dev, "failed to get memory region\n"); |
1036 | ret = -ENODEV; | 1036 | ret = -ENODEV; |
1037 | goto err; | 1037 | goto err; |
1038 | } | 1038 | } |
1039 | 1039 | ||
1040 | ctrl->irq = of_irq_to_resource(ofdev->node, 0, NULL); | 1040 | ctrl->irq = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
1041 | if (ctrl->irq == NO_IRQ) { | 1041 | if (ctrl->irq == NO_IRQ) { |
1042 | dev_err(&ofdev->dev, "failed to get irq resource\n"); | 1042 | dev_err(&ofdev->dev, "failed to get irq resource\n"); |
1043 | ret = -ENODEV; | 1043 | ret = -ENODEV; |
@@ -1058,7 +1058,7 @@ static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev, | |||
1058 | goto err; | 1058 | goto err; |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | for_each_child_of_node(ofdev->node, child) | 1061 | for_each_child_of_node(ofdev->dev.of_node, child) |
1062 | if (of_device_is_compatible(child, "fsl,elbc-fcm-nand")) | 1062 | if (of_device_is_compatible(child, "fsl,elbc-fcm-nand")) |
1063 | fsl_elbc_chip_probe(ctrl, child); | 1063 | fsl_elbc_chip_probe(ctrl, child); |
1064 | 1064 | ||
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index b983cae8c298..c0e05f5ff8a4 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
@@ -239,14 +239,14 @@ static int __devinit ndfc_probe(struct of_device *ofdev, | |||
239 | dev_set_drvdata(&ofdev->dev, ndfc); | 239 | dev_set_drvdata(&ofdev->dev, ndfc); |
240 | 240 | ||
241 | /* Read the reg property to get the chip select */ | 241 | /* Read the reg property to get the chip select */ |
242 | reg = of_get_property(ofdev->node, "reg", &len); | 242 | reg = of_get_property(ofdev->dev.of_node, "reg", &len); |
243 | if (reg == NULL || len != 12) { | 243 | if (reg == NULL || len != 12) { |
244 | dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); | 244 | dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); |
245 | return -ENOENT; | 245 | return -ENOENT; |
246 | } | 246 | } |
247 | ndfc->chip_select = reg[0]; | 247 | ndfc->chip_select = reg[0]; |
248 | 248 | ||
249 | ndfc->ndfcbase = of_iomap(ofdev->node, 0); | 249 | ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); |
250 | if (!ndfc->ndfcbase) { | 250 | if (!ndfc->ndfcbase) { |
251 | dev_err(&ofdev->dev, "failed to get memory\n"); | 251 | dev_err(&ofdev->dev, "failed to get memory\n"); |
252 | return -EIO; | 252 | return -EIO; |
@@ -255,20 +255,20 @@ static int __devinit ndfc_probe(struct of_device *ofdev, | |||
255 | ccr = NDFC_CCR_BS(ndfc->chip_select); | 255 | ccr = NDFC_CCR_BS(ndfc->chip_select); |
256 | 256 | ||
257 | /* It is ok if ccr does not exist - just default to 0 */ | 257 | /* It is ok if ccr does not exist - just default to 0 */ |
258 | reg = of_get_property(ofdev->node, "ccr", NULL); | 258 | reg = of_get_property(ofdev->dev.of_node, "ccr", NULL); |
259 | if (reg) | 259 | if (reg) |
260 | ccr |= *reg; | 260 | ccr |= *reg; |
261 | 261 | ||
262 | out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); | 262 | out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); |
263 | 263 | ||
264 | /* Set the bank settings if given */ | 264 | /* Set the bank settings if given */ |
265 | reg = of_get_property(ofdev->node, "bank-settings", NULL); | 265 | reg = of_get_property(ofdev->dev.of_node, "bank-settings", NULL); |
266 | if (reg) { | 266 | if (reg) { |
267 | int offset = NDFC_BCFG0 + (ndfc->chip_select << 2); | 267 | int offset = NDFC_BCFG0 + (ndfc->chip_select << 2); |
268 | out_be32(ndfc->ndfcbase + offset, *reg); | 268 | out_be32(ndfc->ndfcbase + offset, *reg); |
269 | } | 269 | } |
270 | 270 | ||
271 | err = ndfc_chip_init(ndfc, ofdev->node); | 271 | err = ndfc_chip_init(ndfc, ofdev->dev.of_node); |
272 | if (err) { | 272 | if (err) { |
273 | iounmap(ndfc->ndfcbase); | 273 | iounmap(ndfc->ndfcbase); |
274 | return err; | 274 | return err; |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index a8b9376cf324..edfc27b78513 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
@@ -93,7 +93,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev, | |||
93 | const struct of_device_id *match) | 93 | const struct of_device_id *match) |
94 | { | 94 | { |
95 | struct pci_dev *pdev; | 95 | struct pci_dev *pdev; |
96 | struct device_node *np = ofdev->node; | 96 | struct device_node *np = ofdev->dev.of_node; |
97 | struct resource res; | 97 | struct resource res; |
98 | struct nand_chip *chip; | 98 | struct nand_chip *chip; |
99 | int err = 0; | 99 | int err = 0; |
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index 9dd076a626a5..dc5f20cdf93c 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c | |||
@@ -72,7 +72,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
72 | { | 72 | { |
73 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 73 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
74 | struct sja1000_priv *priv = netdev_priv(dev); | 74 | struct sja1000_priv *priv = netdev_priv(dev); |
75 | struct device_node *np = ofdev->node; | 75 | struct device_node *np = ofdev->dev.of_node; |
76 | struct resource res; | 76 | struct resource res; |
77 | 77 | ||
78 | dev_set_drvdata(&ofdev->dev, NULL); | 78 | dev_set_drvdata(&ofdev->dev, NULL); |
@@ -91,7 +91,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
91 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, | 91 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, |
92 | const struct of_device_id *id) | 92 | const struct of_device_id *id) |
93 | { | 93 | { |
94 | struct device_node *np = ofdev->node; | 94 | struct device_node *np = ofdev->dev.of_node; |
95 | struct net_device *dev; | 95 | struct net_device *dev; |
96 | struct sja1000_priv *priv; | 96 | struct sja1000_priv *priv; |
97 | struct resource res; | 97 | struct resource res; |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 809ccc9ff09c..59dac232006c 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -3035,7 +3035,7 @@ static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id, | |||
3035 | static void __devinit logical_port_release(struct device *dev) | 3035 | static void __devinit logical_port_release(struct device *dev) |
3036 | { | 3036 | { |
3037 | struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev); | 3037 | struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev); |
3038 | of_node_put(port->ofdev.node); | 3038 | of_node_put(port->ofdev.dev.of_node); |
3039 | } | 3039 | } |
3040 | 3040 | ||
3041 | static struct device *ehea_register_port(struct ehea_port *port, | 3041 | static struct device *ehea_register_port(struct ehea_port *port, |
@@ -3043,7 +3043,7 @@ static struct device *ehea_register_port(struct ehea_port *port, | |||
3043 | { | 3043 | { |
3044 | int ret; | 3044 | int ret; |
3045 | 3045 | ||
3046 | port->ofdev.node = of_node_get(dn); | 3046 | port->ofdev.dev.of_node = of_node_get(dn); |
3047 | port->ofdev.dev.parent = &port->adapter->ofdev->dev; | 3047 | port->ofdev.dev.parent = &port->adapter->ofdev->dev; |
3048 | port->ofdev.dev.bus = &ibmebus_bus_type; | 3048 | port->ofdev.dev.bus = &ibmebus_bus_type; |
3049 | 3049 | ||
@@ -3210,7 +3210,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter) | |||
3210 | const u32 *dn_log_port_id; | 3210 | const u32 *dn_log_port_id; |
3211 | int i = 0; | 3211 | int i = 0; |
3212 | 3212 | ||
3213 | lhea_dn = adapter->ofdev->node; | 3213 | lhea_dn = adapter->ofdev->dev.of_node; |
3214 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { | 3214 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { |
3215 | 3215 | ||
3216 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", | 3216 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", |
@@ -3249,7 +3249,7 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter, | |||
3249 | struct device_node *eth_dn = NULL; | 3249 | struct device_node *eth_dn = NULL; |
3250 | const u32 *dn_log_port_id; | 3250 | const u32 *dn_log_port_id; |
3251 | 3251 | ||
3252 | lhea_dn = adapter->ofdev->node; | 3252 | lhea_dn = adapter->ofdev->dev.of_node; |
3253 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { | 3253 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { |
3254 | 3254 | ||
3255 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", | 3255 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", |
@@ -3379,7 +3379,7 @@ static int __devinit ehea_probe_adapter(struct of_device *dev, | |||
3379 | const u64 *adapter_handle; | 3379 | const u64 *adapter_handle; |
3380 | int ret; | 3380 | int ret; |
3381 | 3381 | ||
3382 | if (!dev || !dev->node) { | 3382 | if (!dev || !dev->dev.of_node) { |
3383 | ehea_error("Invalid ibmebus device probed"); | 3383 | ehea_error("Invalid ibmebus device probed"); |
3384 | return -EINVAL; | 3384 | return -EINVAL; |
3385 | } | 3385 | } |
@@ -3395,14 +3395,14 @@ static int __devinit ehea_probe_adapter(struct of_device *dev, | |||
3395 | 3395 | ||
3396 | adapter->ofdev = dev; | 3396 | adapter->ofdev = dev; |
3397 | 3397 | ||
3398 | adapter_handle = of_get_property(dev->node, "ibm,hea-handle", | 3398 | adapter_handle = of_get_property(dev->dev.of_node, "ibm,hea-handle", |
3399 | NULL); | 3399 | NULL); |
3400 | if (adapter_handle) | 3400 | if (adapter_handle) |
3401 | adapter->handle = *adapter_handle; | 3401 | adapter->handle = *adapter_handle; |
3402 | 3402 | ||
3403 | if (!adapter->handle) { | 3403 | if (!adapter->handle) { |
3404 | dev_err(&dev->dev, "failed getting handle for adapter" | 3404 | dev_err(&dev->dev, "failed getting handle for adapter" |
3405 | " '%s'\n", dev->node->full_name); | 3405 | " '%s'\n", dev->dev.of_node->full_name); |
3406 | ret = -ENODEV; | 3406 | ret = -ENODEV; |
3407 | goto out_free_ad; | 3407 | goto out_free_ad; |
3408 | } | 3408 | } |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 4a43e56b7394..3342056f8aac 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -873,7 +873,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
873 | priv->ndev = ndev; | 873 | priv->ndev = ndev; |
874 | 874 | ||
875 | /* Reserve FEC control zone */ | 875 | /* Reserve FEC control zone */ |
876 | rv = of_address_to_resource(op->node, 0, &mem); | 876 | rv = of_address_to_resource(op->dev.of_node, 0, &mem); |
877 | if (rv) { | 877 | if (rv) { |
878 | printk(KERN_ERR DRIVER_NAME ": " | 878 | printk(KERN_ERR DRIVER_NAME ": " |
879 | "Error while parsing device node resource\n" ); | 879 | "Error while parsing device node resource\n" ); |
@@ -921,7 +921,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
921 | 921 | ||
922 | /* Get the IRQ we need one by one */ | 922 | /* Get the IRQ we need one by one */ |
923 | /* Control */ | 923 | /* Control */ |
924 | ndev->irq = irq_of_parse_and_map(op->node, 0); | 924 | ndev->irq = irq_of_parse_and_map(op->dev.of_node, 0); |
925 | 925 | ||
926 | /* RX */ | 926 | /* RX */ |
927 | priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); | 927 | priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); |
@@ -944,20 +944,20 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
944 | /* Start with safe defaults for link connection */ | 944 | /* Start with safe defaults for link connection */ |
945 | priv->speed = 100; | 945 | priv->speed = 100; |
946 | priv->duplex = DUPLEX_HALF; | 946 | priv->duplex = DUPLEX_HALF; |
947 | priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1; | 947 | priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->dev.of_node) >> 20) / 5) << 1; |
948 | 948 | ||
949 | /* The current speed preconfigures the speed of the MII link */ | 949 | /* The current speed preconfigures the speed of the MII link */ |
950 | prop = of_get_property(op->node, "current-speed", &prop_size); | 950 | prop = of_get_property(op->dev.of_node, "current-speed", &prop_size); |
951 | if (prop && (prop_size >= sizeof(u32) * 2)) { | 951 | if (prop && (prop_size >= sizeof(u32) * 2)) { |
952 | priv->speed = prop[0]; | 952 | priv->speed = prop[0]; |
953 | priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; | 953 | priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; |
954 | } | 954 | } |
955 | 955 | ||
956 | /* If there is a phy handle, then get the PHY node */ | 956 | /* If there is a phy handle, then get the PHY node */ |
957 | priv->phy_node = of_parse_phandle(op->node, "phy-handle", 0); | 957 | priv->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0); |
958 | 958 | ||
959 | /* the 7-wire property means don't use MII mode */ | 959 | /* the 7-wire property means don't use MII mode */ |
960 | if (of_find_property(op->node, "fsl,7-wire-mode", NULL)) { | 960 | if (of_find_property(op->dev.of_node, "fsl,7-wire-mode", NULL)) { |
961 | priv->seven_wire_mode = 1; | 961 | priv->seven_wire_mode = 1; |
962 | dev_info(&ndev->dev, "using 7-wire PHY mode\n"); | 962 | dev_info(&ndev->dev, "using 7-wire PHY mode\n"); |
963 | } | 963 | } |
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index 7658a082e390..0d099e5a652d 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c | |||
@@ -66,7 +66,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, | |||
66 | const struct of_device_id *match) | 66 | const struct of_device_id *match) |
67 | { | 67 | { |
68 | struct device *dev = &of->dev; | 68 | struct device *dev = &of->dev; |
69 | struct device_node *np = of->node; | 69 | struct device_node *np = of->dev.of_node; |
70 | struct mii_bus *bus; | 70 | struct mii_bus *bus; |
71 | struct mpc52xx_fec_mdio_priv *priv; | 71 | struct mpc52xx_fec_mdio_priv *priv; |
72 | struct resource res = {}; | 72 | struct resource res = {}; |
@@ -107,7 +107,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, | |||
107 | 107 | ||
108 | /* set MII speed */ | 108 | /* set MII speed */ |
109 | out_be32(&priv->regs->mii_speed, | 109 | out_be32(&priv->regs->mii_speed, |
110 | ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1); | 110 | ((mpc5xxx_get_bus_frequency(of->dev.of_node) >> 20) / 5) << 1); |
111 | 111 | ||
112 | err = of_mdiobus_register(bus, np); | 112 | err = of_mdiobus_register(bus, np); |
113 | if (err) | 113 | if (err) |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 0770e2f6da6b..caeb88b67bc6 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -1015,7 +1015,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
1015 | return -ENOMEM; | 1015 | return -ENOMEM; |
1016 | 1016 | ||
1017 | if (!IS_FEC(match)) { | 1017 | if (!IS_FEC(match)) { |
1018 | data = of_get_property(ofdev->node, "fsl,cpm-command", &len); | 1018 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); |
1019 | if (!data || len != 4) | 1019 | if (!data || len != 4) |
1020 | goto out_free_fpi; | 1020 | goto out_free_fpi; |
1021 | 1021 | ||
@@ -1027,8 +1027,8 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
1027 | fpi->rx_copybreak = 240; | 1027 | fpi->rx_copybreak = 240; |
1028 | fpi->use_napi = 1; | 1028 | fpi->use_napi = 1; |
1029 | fpi->napi_weight = 17; | 1029 | fpi->napi_weight = 17; |
1030 | fpi->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); | 1030 | fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0); |
1031 | if ((!fpi->phy_node) && (!of_get_property(ofdev->node, "fixed-link", | 1031 | if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link", |
1032 | NULL))) | 1032 | NULL))) |
1033 | goto out_free_fpi; | 1033 | goto out_free_fpi; |
1034 | 1034 | ||
@@ -1061,7 +1061,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
1061 | spin_lock_init(&fep->lock); | 1061 | spin_lock_init(&fep->lock); |
1062 | spin_lock_init(&fep->tx_lock); | 1062 | spin_lock_init(&fep->tx_lock); |
1063 | 1063 | ||
1064 | mac_addr = of_get_mac_address(ofdev->node); | 1064 | mac_addr = of_get_mac_address(ofdev->dev.of_node); |
1065 | if (mac_addr) | 1065 | if (mac_addr) |
1066 | memcpy(ndev->dev_addr, mac_addr, 6); | 1066 | memcpy(ndev->dev_addr, mac_addr, 6); |
1067 | 1067 | ||
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 0a973e71876b..9d4f272137d6 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -88,19 +88,19 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
88 | struct fs_platform_info *fpi = fep->fpi; | 88 | struct fs_platform_info *fpi = fep->fpi; |
89 | int ret = -EINVAL; | 89 | int ret = -EINVAL; |
90 | 90 | ||
91 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 91 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
92 | if (fep->interrupt == NO_IRQ) | 92 | if (fep->interrupt == NO_IRQ) |
93 | goto out; | 93 | goto out; |
94 | 94 | ||
95 | fep->fcc.fccp = of_iomap(ofdev->node, 0); | 95 | fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0); |
96 | if (!fep->fcc.fccp) | 96 | if (!fep->fcc.fccp) |
97 | goto out; | 97 | goto out; |
98 | 98 | ||
99 | fep->fcc.ep = of_iomap(ofdev->node, 1); | 99 | fep->fcc.ep = of_iomap(ofdev->dev.of_node, 1); |
100 | if (!fep->fcc.ep) | 100 | if (!fep->fcc.ep) |
101 | goto out_fccp; | 101 | goto out_fccp; |
102 | 102 | ||
103 | fep->fcc.fcccp = of_iomap(ofdev->node, 2); | 103 | fep->fcc.fcccp = of_iomap(ofdev->dev.of_node, 2); |
104 | if (!fep->fcc.fcccp) | 104 | if (!fep->fcc.fcccp) |
105 | goto out_ep; | 105 | goto out_ep; |
106 | 106 | ||
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index ec81f50d5919..bd7a6e7064bb 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -98,11 +98,11 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
98 | { | 98 | { |
99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct of_device *ofdev = to_of_device(fep->dev); |
100 | 100 | ||
101 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
103 | return -EINVAL; | 103 | return -EINVAL; |
104 | 104 | ||
105 | fep->fec.fecp = of_iomap(ofdev->node, 0); | 105 | fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); |
106 | if (!fep->fcc.fccp) | 106 | if (!fep->fcc.fccp) |
107 | return -EINVAL; | 107 | return -EINVAL; |
108 | 108 | ||
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 34d3da751eb4..49a4d8c60168 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -98,15 +98,15 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
98 | { | 98 | { |
99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct of_device *ofdev = to_of_device(fep->dev); |
100 | 100 | ||
101 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
103 | return -EINVAL; | 103 | return -EINVAL; |
104 | 104 | ||
105 | fep->scc.sccp = of_iomap(ofdev->node, 0); | 105 | fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0); |
106 | if (!fep->scc.sccp) | 106 | if (!fep->scc.sccp) |
107 | return -EINVAL; | 107 | return -EINVAL; |
108 | 108 | ||
109 | fep->scc.ep = of_iomap(ofdev->node, 1); | 109 | fep->scc.ep = of_iomap(ofdev->dev.of_node, 1); |
110 | if (!fep->scc.ep) { | 110 | if (!fep->scc.ep) { |
111 | iounmap(fep->scc.sccp); | 111 | iounmap(fep->scc.sccp); |
112 | return -EINVAL; | 112 | return -EINVAL; |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 5944b65082cb..dc862e779c1f 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -124,7 +124,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
124 | new_bus->write = &fs_enet_fec_mii_write; | 124 | new_bus->write = &fs_enet_fec_mii_write; |
125 | new_bus->reset = &fs_enet_fec_mii_reset; | 125 | new_bus->reset = &fs_enet_fec_mii_reset; |
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 | goto out_res; | 129 | goto out_res; |
130 | 130 | ||
@@ -135,7 +135,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
135 | goto out_fec; | 135 | goto out_fec; |
136 | 136 | ||
137 | if (get_bus_freq) { | 137 | if (get_bus_freq) { |
138 | clock = get_bus_freq(ofdev->node); | 138 | clock = get_bus_freq(ofdev->dev.of_node); |
139 | if (!clock) { | 139 | if (!clock) { |
140 | /* Use maximum divider if clock is unknown */ | 140 | /* Use maximum divider if clock is unknown */ |
141 | dev_warn(&ofdev->dev, "could not determine IPS clock\n"); | 141 | dev_warn(&ofdev->dev, "could not determine IPS clock\n"); |
@@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
172 | new_bus->parent = &ofdev->dev; | 172 | new_bus->parent = &ofdev->dev; |
173 | dev_set_drvdata(&ofdev->dev, new_bus); | 173 | dev_set_drvdata(&ofdev->dev, new_bus); |
174 | 174 | ||
175 | ret = of_mdiobus_register(new_bus, ofdev->node); | 175 | ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); |
176 | if (ret) | 176 | if (ret) |
177 | goto out_free_irqs; | 177 | goto out_free_irqs; |
178 | 178 | ||
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index d5160edf2fcf..72489a213bf7 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c | |||
@@ -271,7 +271,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) | |||
271 | static int fsl_pq_mdio_probe(struct of_device *ofdev, | 271 | static int fsl_pq_mdio_probe(struct of_device *ofdev, |
272 | const struct of_device_id *match) | 272 | const struct of_device_id *match) |
273 | { | 273 | { |
274 | struct device_node *np = ofdev->node; | 274 | struct device_node *np = ofdev->dev.of_node; |
275 | struct device_node *tbi; | 275 | struct device_node *tbi; |
276 | struct fsl_pq_mdio_priv *priv; | 276 | struct fsl_pq_mdio_priv *priv; |
277 | struct fsl_pq_mdio __iomem *regs = NULL; | 277 | struct fsl_pq_mdio __iomem *regs = NULL; |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 080d1cea5b26..b71bba91064c 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -603,7 +603,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) | |||
603 | int err = 0, i; | 603 | int err = 0, i; |
604 | struct net_device *dev = NULL; | 604 | struct net_device *dev = NULL; |
605 | struct gfar_private *priv = NULL; | 605 | struct gfar_private *priv = NULL; |
606 | struct device_node *np = ofdev->node; | 606 | struct device_node *np = ofdev->dev.of_node; |
607 | struct device_node *child = NULL; | 607 | struct device_node *child = NULL; |
608 | const u32 *stash; | 608 | const u32 *stash; |
609 | const u32 *stash_len; | 609 | const u32 *stash_len; |
@@ -641,7 +641,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) | |||
641 | return -ENOMEM; | 641 | return -ENOMEM; |
642 | 642 | ||
643 | priv = netdev_priv(dev); | 643 | priv = netdev_priv(dev); |
644 | priv->node = ofdev->node; | 644 | priv->node = ofdev->dev.of_node; |
645 | priv->ndev = dev; | 645 | priv->ndev = dev; |
646 | 646 | ||
647 | dev->num_tx_queues = num_tx_qs; | 647 | dev->num_tx_queues = num_tx_qs; |
@@ -888,7 +888,7 @@ static int gfar_probe(struct of_device *ofdev, | |||
888 | priv = netdev_priv(dev); | 888 | priv = netdev_priv(dev); |
889 | priv->ndev = dev; | 889 | priv->ndev = dev; |
890 | priv->ofdev = ofdev; | 890 | priv->ofdev = ofdev; |
891 | priv->node = ofdev->node; | 891 | priv->node = ofdev->dev.of_node; |
892 | SET_NETDEV_DEV(dev, &ofdev->dev); | 892 | SET_NETDEV_DEV(dev, &ofdev->dev); |
893 | 893 | ||
894 | spin_lock_init(&priv->bflock); | 894 | spin_lock_init(&priv->bflock); |
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index 3a90430de918..61fd54d35f63 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
@@ -1500,7 +1500,8 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev | |||
1500 | if (i == 6) { | 1500 | if (i == 6) { |
1501 | const unsigned char *addr; | 1501 | const unsigned char *addr; |
1502 | int len; | 1502 | int len; |
1503 | addr = of_get_property(ofdev->node, "local-mac-address", &len); | 1503 | addr = of_get_property(ofdev->dev.of_node, "local-mac-address", |
1504 | &len); | ||
1504 | if (addr != NULL && len == 6) { | 1505 | if (addr != NULL && len == 6) { |
1505 | for (i = 0; i < 6; i++) | 1506 | for (i = 0; i < 6; i++) |
1506 | macaddr[i] = (unsigned int) addr[i]; | 1507 | macaddr[i] = (unsigned int) addr[i]; |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index dd873cc41c2b..cda2ba891344 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -136,7 +136,8 @@ static inline void emac_report_timeout_error(struct emac_instance *dev, | |||
136 | EMAC_FTR_440EP_PHY_CLK_FIX)) | 136 | EMAC_FTR_440EP_PHY_CLK_FIX)) |
137 | DBG(dev, "%s" NL, error); | 137 | DBG(dev, "%s" NL, error); |
138 | else if (net_ratelimit()) | 138 | else if (net_ratelimit()) |
139 | printk(KERN_ERR "%s: %s\n", dev->ofdev->node->full_name, error); | 139 | printk(KERN_ERR "%s: %s\n", dev->ofdev->dev.of_node->full_name, |
140 | error); | ||
140 | } | 141 | } |
141 | 142 | ||
142 | /* EMAC PHY clock workaround: | 143 | /* EMAC PHY clock workaround: |
@@ -2185,7 +2186,7 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev, | |||
2185 | strcpy(info->version, DRV_VERSION); | 2186 | strcpy(info->version, DRV_VERSION); |
2186 | info->fw_version[0] = '\0'; | 2187 | info->fw_version[0] = '\0'; |
2187 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", | 2188 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", |
2188 | dev->cell_index, dev->ofdev->node->full_name); | 2189 | dev->cell_index, dev->ofdev->dev.of_node->full_name); |
2189 | info->regdump_len = emac_ethtool_get_regs_len(ndev); | 2190 | info->regdump_len = emac_ethtool_get_regs_len(ndev); |
2190 | } | 2191 | } |
2191 | 2192 | ||
@@ -2379,7 +2380,7 @@ static int __devinit emac_read_uint_prop(struct device_node *np, const char *nam | |||
2379 | 2380 | ||
2380 | static int __devinit emac_init_phy(struct emac_instance *dev) | 2381 | static int __devinit emac_init_phy(struct emac_instance *dev) |
2381 | { | 2382 | { |
2382 | struct device_node *np = dev->ofdev->node; | 2383 | struct device_node *np = dev->ofdev->dev.of_node; |
2383 | struct net_device *ndev = dev->ndev; | 2384 | struct net_device *ndev = dev->ndev; |
2384 | u32 phy_map, adv; | 2385 | u32 phy_map, adv; |
2385 | int i; | 2386 | int i; |
@@ -2514,7 +2515,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev) | |||
2514 | 2515 | ||
2515 | static int __devinit emac_init_config(struct emac_instance *dev) | 2516 | static int __devinit emac_init_config(struct emac_instance *dev) |
2516 | { | 2517 | { |
2517 | struct device_node *np = dev->ofdev->node; | 2518 | struct device_node *np = dev->ofdev->dev.of_node; |
2518 | const void *p; | 2519 | const void *p; |
2519 | unsigned int plen; | 2520 | unsigned int plen; |
2520 | const char *pm, *phy_modes[] = { | 2521 | const char *pm, *phy_modes[] = { |
@@ -2723,7 +2724,7 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
2723 | { | 2724 | { |
2724 | struct net_device *ndev; | 2725 | struct net_device *ndev; |
2725 | struct emac_instance *dev; | 2726 | struct emac_instance *dev; |
2726 | struct device_node *np = ofdev->node; | 2727 | struct device_node *np = ofdev->dev.of_node; |
2727 | struct device_node **blist = NULL; | 2728 | struct device_node **blist = NULL; |
2728 | int err, i; | 2729 | int err, i; |
2729 | 2730 | ||
@@ -2810,7 +2811,7 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
2810 | err = mal_register_commac(dev->mal, &dev->commac); | 2811 | err = mal_register_commac(dev->mal, &dev->commac); |
2811 | if (err) { | 2812 | if (err) { |
2812 | printk(KERN_ERR "%s: failed to register with mal %s!\n", | 2813 | printk(KERN_ERR "%s: failed to register with mal %s!\n", |
2813 | np->full_name, dev->mal_dev->node->full_name); | 2814 | np->full_name, dev->mal_dev->dev.of_node->full_name); |
2814 | goto err_rel_deps; | 2815 | goto err_rel_deps; |
2815 | } | 2816 | } |
2816 | dev->rx_skb_size = emac_rx_skb_size(ndev->mtu); | 2817 | dev->rx_skb_size = emac_rx_skb_size(ndev->mtu); |
diff --git a/drivers/net/ibm_newemac/debug.c b/drivers/net/ibm_newemac/debug.c index 775c850a425a..3995fafc1e08 100644 --- a/drivers/net/ibm_newemac/debug.c +++ b/drivers/net/ibm_newemac/debug.c | |||
@@ -33,7 +33,7 @@ static void emac_desc_dump(struct emac_instance *p) | |||
33 | int i; | 33 | int i; |
34 | printk("** EMAC %s TX BDs **\n" | 34 | printk("** EMAC %s TX BDs **\n" |
35 | " tx_cnt = %d tx_slot = %d ack_slot = %d\n", | 35 | " tx_cnt = %d tx_slot = %d ack_slot = %d\n", |
36 | p->ofdev->node->full_name, | 36 | p->ofdev->dev.of_node->full_name, |
37 | p->tx_cnt, p->tx_slot, p->ack_slot); | 37 | p->tx_cnt, p->tx_slot, p->ack_slot); |
38 | for (i = 0; i < NUM_TX_BUFF / 2; ++i) | 38 | for (i = 0; i < NUM_TX_BUFF / 2; ++i) |
39 | printk | 39 | printk |
@@ -49,7 +49,7 @@ static void emac_desc_dump(struct emac_instance *p) | |||
49 | printk("** EMAC %s RX BDs **\n" | 49 | printk("** EMAC %s RX BDs **\n" |
50 | " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n" | 50 | " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n" |
51 | " rx_sg_skb = 0x%p\n", | 51 | " rx_sg_skb = 0x%p\n", |
52 | p->ofdev->node->full_name, | 52 | p->ofdev->dev.of_node->full_name, |
53 | p->rx_slot, p->commac.flags, p->rx_skb_size, | 53 | p->rx_slot, p->commac.flags, p->rx_skb_size, |
54 | p->rx_sync_size, p->rx_sg_skb); | 54 | p->rx_sync_size, p->rx_sg_skb); |
55 | for (i = 0; i < NUM_RX_BUFF / 2; ++i) | 55 | for (i = 0; i < NUM_RX_BUFF / 2; ++i) |
@@ -77,7 +77,8 @@ static void emac_mac_dump(struct emac_instance *dev) | |||
77 | "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n" | 77 | "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n" |
78 | "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n" | 78 | "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n" |
79 | "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n", | 79 | "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n", |
80 | dev->ofdev->node->full_name, in_be32(&p->mr0), in_be32(&p->mr1), | 80 | dev->ofdev->dev.of_node->full_name, |
81 | in_be32(&p->mr0), in_be32(&p->mr1), | ||
81 | in_be32(&p->tmr0), in_be32(&p->tmr1), | 82 | in_be32(&p->tmr0), in_be32(&p->tmr1), |
82 | in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser), | 83 | in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser), |
83 | in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid), | 84 | in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid), |
@@ -128,7 +129,7 @@ static void emac_mal_dump(struct mal_instance *mal) | |||
128 | "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n" | 129 | "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n" |
129 | "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n" | 130 | "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n" |
130 | "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n", | 131 | "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n", |
131 | mal->ofdev->node->full_name, | 132 | mal->ofdev->dev.of_node->full_name, |
132 | get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR), | 133 | get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR), |
133 | get_mal_dcrn(mal, MAL_IER), | 134 | get_mal_dcrn(mal, MAL_IER), |
134 | get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR), | 135 | get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR), |
diff --git a/drivers/net/ibm_newemac/debug.h b/drivers/net/ibm_newemac/debug.h index b631842ec8d0..e596c77ccdf7 100644 --- a/drivers/net/ibm_newemac/debug.h +++ b/drivers/net/ibm_newemac/debug.h | |||
@@ -53,8 +53,8 @@ extern void emac_dbg_dump_all(void); | |||
53 | 53 | ||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #define EMAC_DBG(dev, name, fmt, arg...) \ | 56 | #define EMAC_DBG(d, name, fmt, arg...) \ |
57 | printk(KERN_DEBUG #name "%s: " fmt, dev->ofdev->node->full_name, ## arg) | 57 | printk(KERN_DEBUG #name "%s: " fmt, d->ofdev->dev.of_node->full_name, ## arg) |
58 | 58 | ||
59 | #if DBG_LEVEL > 0 | 59 | #if DBG_LEVEL > 0 |
60 | # define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x) | 60 | # define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x) |
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 5b3d94419fe6..aba17947e208 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
@@ -538,11 +538,11 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
538 | } | 538 | } |
539 | mal->index = index; | 539 | mal->index = index; |
540 | mal->ofdev = ofdev; | 540 | mal->ofdev = ofdev; |
541 | mal->version = of_device_is_compatible(ofdev->node, "ibm,mcmal2") ? 2 : 1; | 541 | mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; |
542 | 542 | ||
543 | MAL_DBG(mal, "probe" NL); | 543 | MAL_DBG(mal, "probe" NL); |
544 | 544 | ||
545 | prop = of_get_property(ofdev->node, "num-tx-chans", NULL); | 545 | prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL); |
546 | if (prop == NULL) { | 546 | if (prop == NULL) { |
547 | printk(KERN_ERR | 547 | printk(KERN_ERR |
548 | "mal%d: can't find MAL num-tx-chans property!\n", | 548 | "mal%d: can't find MAL num-tx-chans property!\n", |
@@ -552,7 +552,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
552 | } | 552 | } |
553 | mal->num_tx_chans = prop[0]; | 553 | mal->num_tx_chans = prop[0]; |
554 | 554 | ||
555 | prop = of_get_property(ofdev->node, "num-rx-chans", NULL); | 555 | prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL); |
556 | if (prop == NULL) { | 556 | if (prop == NULL) { |
557 | printk(KERN_ERR | 557 | printk(KERN_ERR |
558 | "mal%d: can't find MAL num-rx-chans property!\n", | 558 | "mal%d: can't find MAL num-rx-chans property!\n", |
@@ -562,14 +562,14 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
562 | } | 562 | } |
563 | mal->num_rx_chans = prop[0]; | 563 | mal->num_rx_chans = prop[0]; |
564 | 564 | ||
565 | dcr_base = dcr_resource_start(ofdev->node, 0); | 565 | dcr_base = dcr_resource_start(ofdev->dev.of_node, 0); |
566 | if (dcr_base == 0) { | 566 | if (dcr_base == 0) { |
567 | printk(KERN_ERR | 567 | printk(KERN_ERR |
568 | "mal%d: can't find DCR resource!\n", index); | 568 | "mal%d: can't find DCR resource!\n", index); |
569 | err = -ENODEV; | 569 | err = -ENODEV; |
570 | goto fail; | 570 | goto fail; |
571 | } | 571 | } |
572 | mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100); | 572 | mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); |
573 | if (!DCR_MAP_OK(mal->dcr_host)) { | 573 | if (!DCR_MAP_OK(mal->dcr_host)) { |
574 | printk(KERN_ERR | 574 | printk(KERN_ERR |
575 | "mal%d: failed to map DCRs !\n", index); | 575 | "mal%d: failed to map DCRs !\n", index); |
@@ -577,28 +577,28 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
577 | goto fail; | 577 | goto fail; |
578 | } | 578 | } |
579 | 579 | ||
580 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) { | 580 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { |
581 | #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ | 581 | #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ |
582 | defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) | 582 | defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) |
583 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | | 583 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | |
584 | MAL_FTR_COMMON_ERR_INT); | 584 | MAL_FTR_COMMON_ERR_INT); |
585 | #else | 585 | #else |
586 | printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", | 586 | printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", |
587 | ofdev->node->full_name); | 587 | ofdev->dev.of_node->full_name); |
588 | err = -ENODEV; | 588 | err = -ENODEV; |
589 | goto fail; | 589 | goto fail; |
590 | #endif | 590 | #endif |
591 | } | 591 | } |
592 | 592 | ||
593 | mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); | 593 | mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
594 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); | 594 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1); |
595 | mal->serr_irq = irq_of_parse_and_map(ofdev->node, 2); | 595 | mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2); |
596 | 596 | ||
597 | if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { | 597 | if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { |
598 | mal->txde_irq = mal->rxde_irq = mal->serr_irq; | 598 | mal->txde_irq = mal->rxde_irq = mal->serr_irq; |
599 | } else { | 599 | } else { |
600 | mal->txde_irq = irq_of_parse_and_map(ofdev->node, 3); | 600 | mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3); |
601 | mal->rxde_irq = irq_of_parse_and_map(ofdev->node, 4); | 601 | mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4); |
602 | } | 602 | } |
603 | 603 | ||
604 | if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || | 604 | if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || |
@@ -629,7 +629,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
629 | /* Current Axon is not happy with priority being non-0, it can | 629 | /* Current Axon is not happy with priority being non-0, it can |
630 | * deadlock, fix it up here | 630 | * deadlock, fix it up here |
631 | */ | 631 | */ |
632 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-axon")) | 632 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon")) |
633 | cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10); | 633 | cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10); |
634 | 634 | ||
635 | /* Apply configuration */ | 635 | /* Apply configuration */ |
@@ -701,7 +701,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
701 | 701 | ||
702 | printk(KERN_INFO | 702 | printk(KERN_INFO |
703 | "MAL v%d %s, %d TX channels, %d RX channels\n", | 703 | "MAL v%d %s, %d TX channels, %d RX channels\n", |
704 | mal->version, ofdev->node->full_name, | 704 | mal->version, ofdev->dev.of_node->full_name, |
705 | mal->num_tx_chans, mal->num_rx_chans); | 705 | mal->num_tx_chans, mal->num_rx_chans); |
706 | 706 | ||
707 | /* Advertise this instance to the rest of the world */ | 707 | /* Advertise this instance to the rest of the world */ |
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c index 5b90d34c8455..6ab630a79e31 100644 --- a/drivers/net/ibm_newemac/rgmii.c +++ b/drivers/net/ibm_newemac/rgmii.c | |||
@@ -103,7 +103,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | |||
103 | /* Check if we need to attach to a RGMII */ | 103 | /* Check if we need to attach to a RGMII */ |
104 | if (input < 0 || !rgmii_valid_mode(mode)) { | 104 | if (input < 0 || !rgmii_valid_mode(mode)) { |
105 | printk(KERN_ERR "%s: unsupported settings !\n", | 105 | printk(KERN_ERR "%s: unsupported settings !\n", |
106 | ofdev->node->full_name); | 106 | ofdev->dev.of_node->full_name); |
107 | return -ENODEV; | 107 | return -ENODEV; |
108 | } | 108 | } |
109 | 109 | ||
@@ -113,7 +113,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | |||
113 | out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); | 113 | out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); |
114 | 114 | ||
115 | printk(KERN_NOTICE "%s: input %d in %s mode\n", | 115 | printk(KERN_NOTICE "%s: input %d in %s mode\n", |
116 | ofdev->node->full_name, input, rgmii_mode_name(mode)); | 116 | ofdev->dev.of_node->full_name, input, rgmii_mode_name(mode)); |
117 | 117 | ||
118 | ++dev->users; | 118 | ++dev->users; |
119 | 119 | ||
@@ -231,7 +231,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf) | |||
231 | static int __devinit rgmii_probe(struct of_device *ofdev, | 231 | static int __devinit rgmii_probe(struct of_device *ofdev, |
232 | const struct of_device_id *match) | 232 | const struct of_device_id *match) |
233 | { | 233 | { |
234 | struct device_node *np = ofdev->node; | 234 | struct device_node *np = ofdev->dev.of_node; |
235 | struct rgmii_instance *dev; | 235 | struct rgmii_instance *dev; |
236 | struct resource regs; | 236 | struct resource regs; |
237 | int rc; | 237 | int rc; |
@@ -264,11 +264,11 @@ static int __devinit rgmii_probe(struct of_device *ofdev, | |||
264 | } | 264 | } |
265 | 265 | ||
266 | /* Check for RGMII flags */ | 266 | /* Check for RGMII flags */ |
267 | if (of_get_property(ofdev->node, "has-mdio", NULL)) | 267 | if (of_get_property(ofdev->dev.of_node, "has-mdio", NULL)) |
268 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; | 268 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; |
269 | 269 | ||
270 | /* CAB lacks the right properties, fix this up */ | 270 | /* CAB lacks the right properties, fix this up */ |
271 | if (of_device_is_compatible(ofdev->node, "ibm,rgmii-axon")) | 271 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,rgmii-axon")) |
272 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; | 272 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; |
273 | 273 | ||
274 | DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n", | 274 | DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n", |
@@ -279,7 +279,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev, | |||
279 | 279 | ||
280 | printk(KERN_INFO | 280 | printk(KERN_INFO |
281 | "RGMII %s initialized with%s MDIO support\n", | 281 | "RGMII %s initialized with%s MDIO support\n", |
282 | ofdev->node->full_name, | 282 | ofdev->dev.of_node->full_name, |
283 | (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out"); | 283 | (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out"); |
284 | 284 | ||
285 | wmb(); | 285 | wmb(); |
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c index 30173a9fb557..4f64b00dd5e8 100644 --- a/drivers/net/ibm_newemac/tah.c +++ b/drivers/net/ibm_newemac/tah.c | |||
@@ -57,7 +57,8 @@ void tah_reset(struct of_device *ofdev) | |||
57 | --n; | 57 | --n; |
58 | 58 | ||
59 | if (unlikely(!n)) | 59 | if (unlikely(!n)) |
60 | printk(KERN_ERR "%s: reset timeout\n", ofdev->node->full_name); | 60 | printk(KERN_ERR "%s: reset timeout\n", |
61 | ofdev->dev.of_node->full_name); | ||
61 | 62 | ||
62 | /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ | 63 | /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ |
63 | out_be32(&p->mr, | 64 | out_be32(&p->mr, |
@@ -89,7 +90,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf) | |||
89 | static int __devinit tah_probe(struct of_device *ofdev, | 90 | static int __devinit tah_probe(struct of_device *ofdev, |
90 | const struct of_device_id *match) | 91 | const struct of_device_id *match) |
91 | { | 92 | { |
92 | struct device_node *np = ofdev->node; | 93 | struct device_node *np = ofdev->dev.of_node; |
93 | struct tah_instance *dev; | 94 | struct tah_instance *dev; |
94 | struct resource regs; | 95 | struct resource regs; |
95 | int rc; | 96 | int rc; |
@@ -127,7 +128,7 @@ static int __devinit tah_probe(struct of_device *ofdev, | |||
127 | tah_reset(ofdev); | 128 | tah_reset(ofdev); |
128 | 129 | ||
129 | printk(KERN_INFO | 130 | printk(KERN_INFO |
130 | "TAH %s initialized\n", ofdev->node->full_name); | 131 | "TAH %s initialized\n", ofdev->dev.of_node->full_name); |
131 | wmb(); | 132 | wmb(); |
132 | 133 | ||
133 | return 0; | 134 | return 0; |
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c index 1f038f808ab3..b4fa823ed201 100644 --- a/drivers/net/ibm_newemac/zmii.c +++ b/drivers/net/ibm_newemac/zmii.c | |||
@@ -121,13 +121,14 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) | |||
121 | dev->mode = *mode; | 121 | dev->mode = *mode; |
122 | 122 | ||
123 | printk(KERN_NOTICE "%s: bridge in %s mode\n", | 123 | printk(KERN_NOTICE "%s: bridge in %s mode\n", |
124 | ofdev->node->full_name, zmii_mode_name(dev->mode)); | 124 | ofdev->dev.of_node->full_name, |
125 | zmii_mode_name(dev->mode)); | ||
125 | } else { | 126 | } else { |
126 | /* All inputs must use the same mode */ | 127 | /* All inputs must use the same mode */ |
127 | if (*mode != PHY_MODE_NA && *mode != dev->mode) { | 128 | if (*mode != PHY_MODE_NA && *mode != dev->mode) { |
128 | printk(KERN_ERR | 129 | printk(KERN_ERR |
129 | "%s: invalid mode %d specified for input %d\n", | 130 | "%s: invalid mode %d specified for input %d\n", |
130 | ofdev->node->full_name, *mode, input); | 131 | ofdev->dev.of_node->full_name, *mode, input); |
131 | mutex_unlock(&dev->lock); | 132 | mutex_unlock(&dev->lock); |
132 | return -EINVAL; | 133 | return -EINVAL; |
133 | } | 134 | } |
@@ -233,7 +234,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf) | |||
233 | static int __devinit zmii_probe(struct of_device *ofdev, | 234 | static int __devinit zmii_probe(struct of_device *ofdev, |
234 | const struct of_device_id *match) | 235 | const struct of_device_id *match) |
235 | { | 236 | { |
236 | struct device_node *np = ofdev->node; | 237 | struct device_node *np = ofdev->dev.of_node; |
237 | struct zmii_instance *dev; | 238 | struct zmii_instance *dev; |
238 | struct resource regs; | 239 | struct resource regs; |
239 | int rc; | 240 | int rc; |
@@ -273,7 +274,7 @@ static int __devinit zmii_probe(struct of_device *ofdev, | |||
273 | out_be32(&dev->base->fer, 0); | 274 | out_be32(&dev->base->fer, 0); |
274 | 275 | ||
275 | printk(KERN_INFO | 276 | printk(KERN_INFO |
276 | "ZMII %s initialized\n", ofdev->node->full_name); | 277 | "ZMII %s initialized\n", ofdev->dev.of_node->full_name); |
277 | wmb(); | 278 | wmb(); |
278 | dev_set_drvdata(&ofdev->dev, dev); | 279 | dev_set_drvdata(&ofdev->dev, dev); |
279 | 280 | ||
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index ba617e3cf1bb..9c7395c10e44 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -858,14 +858,14 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
858 | mutex_init(&lp->indirect_mutex); | 858 | mutex_init(&lp->indirect_mutex); |
859 | 859 | ||
860 | /* map device registers */ | 860 | /* map device registers */ |
861 | lp->regs = of_iomap(op->node, 0); | 861 | lp->regs = of_iomap(op->dev.of_node, 0); |
862 | if (!lp->regs) { | 862 | if (!lp->regs) { |
863 | dev_err(&op->dev, "could not map temac regs.\n"); | 863 | dev_err(&op->dev, "could not map temac regs.\n"); |
864 | goto nodev; | 864 | goto nodev; |
865 | } | 865 | } |
866 | 866 | ||
867 | /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ | 867 | /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ |
868 | np = of_parse_phandle(op->node, "llink-connected", 0); | 868 | np = of_parse_phandle(op->dev.of_node, "llink-connected", 0); |
869 | if (!np) { | 869 | if (!np) { |
870 | dev_err(&op->dev, "could not find DMA node\n"); | 870 | dev_err(&op->dev, "could not find DMA node\n"); |
871 | goto nodev; | 871 | goto nodev; |
@@ -890,7 +890,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
890 | of_node_put(np); /* Finished with the DMA node; drop the reference */ | 890 | of_node_put(np); /* Finished with the DMA node; drop the reference */ |
891 | 891 | ||
892 | /* Retrieve the MAC address */ | 892 | /* Retrieve the MAC address */ |
893 | addr = of_get_property(op->node, "local-mac-address", &size); | 893 | addr = of_get_property(op->dev.of_node, "local-mac-address", &size); |
894 | if ((!addr) || (size != 6)) { | 894 | if ((!addr) || (size != 6)) { |
895 | dev_err(&op->dev, "could not find MAC address\n"); | 895 | dev_err(&op->dev, "could not find MAC address\n"); |
896 | rc = -ENODEV; | 896 | rc = -ENODEV; |
@@ -898,11 +898,11 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
898 | } | 898 | } |
899 | temac_set_mac_address(ndev, (void *)addr); | 899 | temac_set_mac_address(ndev, (void *)addr); |
900 | 900 | ||
901 | rc = temac_mdio_setup(lp, op->node); | 901 | rc = temac_mdio_setup(lp, op->dev.of_node); |
902 | if (rc) | 902 | if (rc) |
903 | dev_warn(&op->dev, "error registering MDIO bus\n"); | 903 | dev_warn(&op->dev, "error registering MDIO bus\n"); |
904 | 904 | ||
905 | lp->phy_node = of_parse_phandle(op->node, "phy-handle", 0); | 905 | lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0); |
906 | if (lp->phy_node) | 906 | if (lp->phy_node) |
907 | dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np); | 907 | dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np); |
908 | 908 | ||
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index b72e749afdf1..e21439f1e775 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -928,7 +928,7 @@ static const struct net_device_ops myri_ops = { | |||
928 | 928 | ||
929 | static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) | 929 | static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) |
930 | { | 930 | { |
931 | struct device_node *dp = op->node; | 931 | struct device_node *dp = op->dev.of_node; |
932 | static unsigned version_printed; | 932 | static unsigned version_printed; |
933 | struct net_device *dev; | 933 | struct net_device *dev; |
934 | struct myri_eth *mp; | 934 | struct myri_eth *mp; |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index d5cd16bfc907..9c1604c04450 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -9094,7 +9094,7 @@ static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) | |||
9094 | const u32 *int_prop; | 9094 | const u32 *int_prop; |
9095 | int i; | 9095 | int i; |
9096 | 9096 | ||
9097 | int_prop = of_get_property(op->node, "interrupts", NULL); | 9097 | int_prop = of_get_property(op->dev.of_node, "interrupts", NULL); |
9098 | if (!int_prop) | 9098 | if (!int_prop) |
9099 | return -ENODEV; | 9099 | return -ENODEV; |
9100 | 9100 | ||
@@ -9245,7 +9245,7 @@ static int __devinit niu_get_of_props(struct niu *np) | |||
9245 | int prop_len; | 9245 | int prop_len; |
9246 | 9246 | ||
9247 | if (np->parent->plat_type == PLAT_TYPE_NIU) | 9247 | if (np->parent->plat_type == PLAT_TYPE_NIU) |
9248 | dp = np->op->node; | 9248 | dp = np->op->dev.of_node; |
9249 | else | 9249 | else |
9250 | dp = pci_device_to_OF_node(np->pdev); | 9250 | dp = pci_device_to_OF_node(np->pdev); |
9251 | 9251 | ||
@@ -10056,10 +10056,10 @@ static int __devinit niu_of_probe(struct of_device *op, | |||
10056 | 10056 | ||
10057 | niu_driver_version(); | 10057 | niu_driver_version(); |
10058 | 10058 | ||
10059 | reg = of_get_property(op->node, "reg", NULL); | 10059 | reg = of_get_property(op->dev.of_node, "reg", NULL); |
10060 | if (!reg) { | 10060 | if (!reg) { |
10061 | dev_err(&op->dev, "%s: No 'reg' property, aborting\n", | 10061 | dev_err(&op->dev, "%s: No 'reg' property, aborting\n", |
10062 | op->node->full_name); | 10062 | op->dev.of_node->full_name); |
10063 | return -ENODEV; | 10063 | return -ENODEV; |
10064 | } | 10064 | } |
10065 | 10065 | ||
@@ -10072,7 +10072,7 @@ static int __devinit niu_of_probe(struct of_device *op, | |||
10072 | np = netdev_priv(dev); | 10072 | np = netdev_priv(dev); |
10073 | 10073 | ||
10074 | memset(&parent_id, 0, sizeof(parent_id)); | 10074 | memset(&parent_id, 0, sizeof(parent_id)); |
10075 | parent_id.of = of_get_parent(op->node); | 10075 | parent_id.of = of_get_parent(op->dev.of_node); |
10076 | 10076 | ||
10077 | np->parent = niu_get_parent(np, &parent_id, | 10077 | np->parent = niu_get_parent(np, &parent_id, |
10078 | PLAT_TYPE_NIU); | 10078 | PLAT_TYPE_NIU); |
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 35897134a5dd..641973ca2417 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
@@ -199,12 +199,12 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | |||
199 | if (!pdata) | 199 | if (!pdata) |
200 | return -ENOMEM; | 200 | return -ENOMEM; |
201 | 201 | ||
202 | ret = of_get_gpio(ofdev->node, 0); | 202 | ret = of_get_gpio(ofdev->dev.of_node, 0); |
203 | if (ret < 0) | 203 | if (ret < 0) |
204 | goto out_free; | 204 | goto out_free; |
205 | pdata->mdc = ret; | 205 | pdata->mdc = ret; |
206 | 206 | ||
207 | ret = of_get_gpio(ofdev->node, 1); | 207 | ret = of_get_gpio(ofdev->dev.of_node, 1); |
208 | if (ret < 0) | 208 | if (ret < 0) |
209 | goto out_free; | 209 | goto out_free; |
210 | pdata->mdio = ret; | 210 | pdata->mdio = ret; |
@@ -213,7 +213,7 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | |||
213 | if (!new_bus) | 213 | if (!new_bus) |
214 | goto out_free; | 214 | goto out_free; |
215 | 215 | ||
216 | ret = of_mdiobus_register(new_bus, ofdev->node); | 216 | ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); |
217 | if (ret) | 217 | if (ret) |
218 | mdio_gpio_bus_deinit(&ofdev->dev); | 218 | mdio_gpio_bus_deinit(&ofdev->dev); |
219 | 219 | ||
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index ed7865a0b5b2..bd286ec5abd9 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -1133,8 +1133,8 @@ static int __devinit bigmac_ether_init(struct of_device *op, | |||
1133 | goto fail_and_cleanup; | 1133 | goto fail_and_cleanup; |
1134 | 1134 | ||
1135 | /* Get supported SBUS burst sizes. */ | 1135 | /* Get supported SBUS burst sizes. */ |
1136 | bsizes = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); | 1136 | bsizes = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff); |
1137 | bsizes_more = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); | 1137 | bsizes_more = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff); |
1138 | 1138 | ||
1139 | bsizes &= 0xff; | 1139 | bsizes &= 0xff; |
1140 | if (bsizes_more != 0xff) | 1140 | if (bsizes_more != 0xff) |
@@ -1186,7 +1186,7 @@ static int __devinit bigmac_ether_init(struct of_device *op, | |||
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | /* Get the board revision of this BigMAC. */ | 1188 | /* Get the board revision of this BigMAC. */ |
1189 | bp->board_rev = of_getintprop_default(bp->bigmac_op->node, | 1189 | bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node, |
1190 | "board-version", 1); | 1190 | "board-version", 1); |
1191 | 1191 | ||
1192 | /* Init auto-negotiation timer state. */ | 1192 | /* Init auto-negotiation timer state. */ |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index b17dbb11bd67..c6463f71c916 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2483,7 +2483,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info | |||
2483 | else { | 2483 | else { |
2484 | const struct linux_prom_registers *regs; | 2484 | const struct linux_prom_registers *regs; |
2485 | struct of_device *op = hp->happy_dev; | 2485 | struct of_device *op = hp->happy_dev; |
2486 | regs = of_get_property(op->node, "regs", NULL); | 2486 | regs = of_get_property(op->dev.of_node, "regs", NULL); |
2487 | if (regs) | 2487 | if (regs) |
2488 | sprintf(info->bus_info, "SBUS:%d", | 2488 | sprintf(info->bus_info, "SBUS:%d", |
2489 | regs->which_io); | 2489 | regs->which_io); |
@@ -2643,14 +2643,14 @@ static const struct net_device_ops hme_netdev_ops = { | |||
2643 | #ifdef CONFIG_SBUS | 2643 | #ifdef CONFIG_SBUS |
2644 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | 2644 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) |
2645 | { | 2645 | { |
2646 | struct device_node *dp = op->node, *sbus_dp; | 2646 | struct device_node *dp = op->dev.of_node, *sbus_dp; |
2647 | struct quattro *qp = NULL; | 2647 | struct quattro *qp = NULL; |
2648 | struct happy_meal *hp; | 2648 | struct happy_meal *hp; |
2649 | struct net_device *dev; | 2649 | struct net_device *dev; |
2650 | int i, qfe_slot = -1; | 2650 | int i, qfe_slot = -1; |
2651 | int err = -ENODEV; | 2651 | int err = -ENODEV; |
2652 | 2652 | ||
2653 | sbus_dp = to_of_device(op->dev.parent)->node; | 2653 | sbus_dp = to_of_device(op->dev.parent)->dev.of_node; |
2654 | 2654 | ||
2655 | /* We can match PCI devices too, do not accept those here. */ | 2655 | /* We can match PCI devices too, do not accept those here. */ |
2656 | if (strcmp(sbus_dp->name, "sbus")) | 2656 | if (strcmp(sbus_dp->name, "sbus")) |
@@ -3241,7 +3241,7 @@ static void happy_meal_pci_exit(void) | |||
3241 | #ifdef CONFIG_SBUS | 3241 | #ifdef CONFIG_SBUS |
3242 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) | 3242 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) |
3243 | { | 3243 | { |
3244 | struct device_node *dp = op->node; | 3244 | struct device_node *dp = op->dev.of_node; |
3245 | const char *model = of_get_property(dp, "model", NULL); | 3245 | const char *model = of_get_property(dp, "model", NULL); |
3246 | int is_qfe = (match->data != NULL); | 3246 | int is_qfe = (match->data != NULL); |
3247 | 3247 | ||
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 0c21653ff9f9..28afc86e0694 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1324,7 +1324,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op, | |||
1324 | struct of_device *ledma, | 1324 | struct of_device *ledma, |
1325 | struct of_device *lebuffer) | 1325 | struct of_device *lebuffer) |
1326 | { | 1326 | { |
1327 | struct device_node *dp = op->node; | 1327 | struct device_node *dp = op->dev.of_node; |
1328 | static unsigned version_printed; | 1328 | static unsigned version_printed; |
1329 | struct lance_private *lp; | 1329 | struct lance_private *lp; |
1330 | struct net_device *dev; | 1330 | struct net_device *dev; |
@@ -1411,7 +1411,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op, | |||
1411 | 1411 | ||
1412 | lp->burst_sizes = 0; | 1412 | lp->burst_sizes = 0; |
1413 | if (lp->ledma) { | 1413 | if (lp->ledma) { |
1414 | struct device_node *ledma_dp = ledma->node; | 1414 | struct device_node *ledma_dp = ledma->dev.of_node; |
1415 | struct device_node *sbus_dp; | 1415 | struct device_node *sbus_dp; |
1416 | unsigned int sbmask; | 1416 | unsigned int sbmask; |
1417 | const char *prop; | 1417 | const char *prop; |
@@ -1507,7 +1507,7 @@ fail: | |||
1507 | static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1507 | static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) |
1508 | { | 1508 | { |
1509 | struct of_device *parent = to_of_device(op->dev.parent); | 1509 | struct of_device *parent = to_of_device(op->dev.parent); |
1510 | struct device_node *parent_dp = parent->node; | 1510 | struct device_node *parent_dp = parent->dev.of_node; |
1511 | int err; | 1511 | int err; |
1512 | 1512 | ||
1513 | if (!strcmp(parent_dp->name, "ledma")) { | 1513 | if (!strcmp(parent_dp->name, "ledma")) { |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index be637dce944c..9864f4fa69d5 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -696,7 +696,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | |||
696 | strcpy(info->version, "3.0"); | 696 | strcpy(info->version, "3.0"); |
697 | 697 | ||
698 | op = qep->op; | 698 | op = qep->op; |
699 | regs = of_get_property(op->node, "reg", NULL); | 699 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
700 | if (regs) | 700 | if (regs) |
701 | sprintf(info->bus_info, "SBUS:%d", regs->which_io); | 701 | sprintf(info->bus_info, "SBUS:%d", regs->which_io); |
702 | 702 | ||
@@ -800,7 +800,7 @@ static struct sunqec * __devinit get_qec(struct of_device *child) | |||
800 | if (qec_global_reset(qecp->gregs)) | 800 | if (qec_global_reset(qecp->gregs)) |
801 | goto fail; | 801 | goto fail; |
802 | 802 | ||
803 | qecp->qec_bursts = qec_get_burst(op->node); | 803 | qecp->qec_bursts = qec_get_burst(op->dev.of_node); |
804 | 804 | ||
805 | qec_init_once(qecp, op); | 805 | qec_init_once(qecp, op); |
806 | 806 | ||
@@ -858,7 +858,7 @@ static int __devinit qec_ether_init(struct of_device *op) | |||
858 | 858 | ||
859 | res = -ENODEV; | 859 | res = -ENODEV; |
860 | 860 | ||
861 | i = of_getintprop_default(op->node, "channel#", -1); | 861 | i = of_getintprop_default(op->dev.of_node, "channel#", -1); |
862 | if (i == -1) | 862 | if (i == -1) |
863 | goto fail; | 863 | goto fail; |
864 | qe->channel = i; | 864 | qe->channel = i; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 1b0aef37e495..88ebfc976735 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3721,7 +3721,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = { | |||
3721 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) | 3721 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) |
3722 | { | 3722 | { |
3723 | struct device *device = &ofdev->dev; | 3723 | struct device *device = &ofdev->dev; |
3724 | struct device_node *np = ofdev->node; | 3724 | struct device_node *np = ofdev->dev.of_node; |
3725 | struct net_device *dev = NULL; | 3725 | struct net_device *dev = NULL; |
3726 | struct ucc_geth_private *ugeth = NULL; | 3726 | struct ucc_geth_private *ugeth = NULL; |
3727 | struct ucc_geth_info *ug_info; | 3727 | struct ucc_geth_info *ug_info; |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 1e783ccc306e..3dd2416db540 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
@@ -1090,7 +1090,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev) | |||
1090 | */ | 1090 | */ |
1091 | static bool get_bool(struct of_device *ofdev, const char *s) | 1091 | static bool get_bool(struct of_device *ofdev, const char *s) |
1092 | { | 1092 | { |
1093 | u32 *p = (u32 *)of_get_property(ofdev->node, s, NULL); | 1093 | u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); |
1094 | 1094 | ||
1095 | if (p) { | 1095 | if (p) { |
1096 | return (bool)*p; | 1096 | return (bool)*p; |
@@ -1132,14 +1132,14 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
1132 | dev_info(dev, "Device Tree Probing\n"); | 1132 | dev_info(dev, "Device Tree Probing\n"); |
1133 | 1133 | ||
1134 | /* Get iospace for the device */ | 1134 | /* Get iospace for the device */ |
1135 | rc = of_address_to_resource(ofdev->node, 0, &r_mem); | 1135 | rc = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem); |
1136 | if (rc) { | 1136 | if (rc) { |
1137 | dev_err(dev, "invalid address\n"); | 1137 | dev_err(dev, "invalid address\n"); |
1138 | return rc; | 1138 | return rc; |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | /* Get IRQ for the device */ | 1141 | /* Get IRQ for the device */ |
1142 | rc = of_irq_to_resource(ofdev->node, 0, &r_irq); | 1142 | rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq); |
1143 | if (rc == NO_IRQ) { | 1143 | if (rc == NO_IRQ) { |
1144 | dev_err(dev, "no IRQ found\n"); | 1144 | dev_err(dev, "no IRQ found\n"); |
1145 | return rc; | 1145 | return rc; |
@@ -1184,7 +1184,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
1184 | lp->next_rx_buf_to_use = 0x0; | 1184 | lp->next_rx_buf_to_use = 0x0; |
1185 | lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); | 1185 | lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); |
1186 | lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); | 1186 | lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); |
1187 | mac_address = of_get_mac_address(ofdev->node); | 1187 | mac_address = of_get_mac_address(ofdev->dev.of_node); |
1188 | 1188 | ||
1189 | if (mac_address) | 1189 | if (mac_address) |
1190 | /* Set the MAC address. */ | 1190 | /* Set the MAC address. */ |
@@ -1199,7 +1199,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
1199 | /* Set the MAC address in the EmacLite device */ | 1199 | /* Set the MAC address in the EmacLite device */ |
1200 | xemaclite_update_address(lp, ndev->dev_addr); | 1200 | xemaclite_update_address(lp, ndev->dev_addr); |
1201 | 1201 | ||
1202 | lp->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); | 1202 | lp->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0); |
1203 | rc = xemaclite_mdio_setup(lp, &ofdev->dev); | 1203 | rc = xemaclite_mdio_setup(lp, &ofdev->dev); |
1204 | if (rc) | 1204 | if (rc) |
1205 | dev_warn(&ofdev->dev, "error registering MDIO bus\n"); | 1205 | dev_warn(&ofdev->dev, "error registering MDIO bus\n"); |
diff --git a/drivers/of/device.c b/drivers/of/device.c index 224ae6bc67b6..24068bbbce1a 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c | |||
@@ -21,9 +21,9 @@ | |||
21 | const struct of_device_id *of_match_device(const struct of_device_id *matches, | 21 | const struct of_device_id *of_match_device(const struct of_device_id *matches, |
22 | const struct of_device *dev) | 22 | const struct of_device *dev) |
23 | { | 23 | { |
24 | if (!dev->node) | 24 | if (!dev->dev.of_node) |
25 | return NULL; | 25 | return NULL; |
26 | return of_match_node(matches, dev->node); | 26 | return of_match_node(matches, dev->dev.of_node); |
27 | } | 27 | } |
28 | EXPORT_SYMBOL(of_match_device); | 28 | EXPORT_SYMBOL(of_match_device); |
29 | 29 | ||
@@ -54,7 +54,7 @@ static ssize_t devspec_show(struct device *dev, | |||
54 | struct of_device *ofdev; | 54 | struct of_device *ofdev; |
55 | 55 | ||
56 | ofdev = to_of_device(dev); | 56 | ofdev = to_of_device(dev); |
57 | return sprintf(buf, "%s\n", ofdev->node->full_name); | 57 | return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); |
58 | } | 58 | } |
59 | 59 | ||
60 | static ssize_t name_show(struct device *dev, | 60 | static ssize_t name_show(struct device *dev, |
@@ -63,7 +63,7 @@ static ssize_t name_show(struct device *dev, | |||
63 | struct of_device *ofdev; | 63 | struct of_device *ofdev; |
64 | 64 | ||
65 | ofdev = to_of_device(dev); | 65 | ofdev = to_of_device(dev); |
66 | return sprintf(buf, "%s\n", ofdev->node->name); | 66 | return sprintf(buf, "%s\n", ofdev->dev.of_node->name); |
67 | } | 67 | } |
68 | 68 | ||
69 | static ssize_t modalias_show(struct device *dev, | 69 | static ssize_t modalias_show(struct device *dev, |
@@ -97,14 +97,14 @@ void of_release_dev(struct device *dev) | |||
97 | struct of_device *ofdev; | 97 | struct of_device *ofdev; |
98 | 98 | ||
99 | ofdev = to_of_device(dev); | 99 | ofdev = to_of_device(dev); |
100 | of_node_put(ofdev->node); | 100 | of_node_put(ofdev->dev.of_node); |
101 | kfree(ofdev); | 101 | kfree(ofdev); |
102 | } | 102 | } |
103 | EXPORT_SYMBOL(of_release_dev); | 103 | EXPORT_SYMBOL(of_release_dev); |
104 | 104 | ||
105 | int of_device_register(struct of_device *ofdev) | 105 | int of_device_register(struct of_device *ofdev) |
106 | { | 106 | { |
107 | BUG_ON(ofdev->node == NULL); | 107 | BUG_ON(ofdev->dev.of_node == NULL); |
108 | 108 | ||
109 | device_initialize(&ofdev->dev); | 109 | device_initialize(&ofdev->dev); |
110 | 110 | ||
@@ -112,7 +112,7 @@ int of_device_register(struct of_device *ofdev) | |||
112 | * the parent. If there is no parent defined, set the node | 112 | * the parent. If there is no parent defined, set the node |
113 | * explicitly */ | 113 | * explicitly */ |
114 | if (!ofdev->dev.parent) | 114 | if (!ofdev->dev.parent) |
115 | set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->node)); | 115 | set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); |
116 | 116 | ||
117 | return device_add(&ofdev->dev); | 117 | return device_add(&ofdev->dev); |
118 | } | 118 | } |
@@ -132,11 +132,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev, | |||
132 | ssize_t tsize, csize, repend; | 132 | ssize_t tsize, csize, repend; |
133 | 133 | ||
134 | /* Name & Type */ | 134 | /* Name & Type */ |
135 | csize = snprintf(str, len, "of:N%sT%s", | 135 | csize = snprintf(str, len, "of:N%sT%s", ofdev->dev.of_node->name, |
136 | ofdev->node->name, ofdev->node->type); | 136 | ofdev->dev.of_node->type); |
137 | 137 | ||
138 | /* Get compatible property if any */ | 138 | /* Get compatible property if any */ |
139 | compat = of_get_property(ofdev->node, "compatible", &cplen); | 139 | compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen); |
140 | if (!compat) | 140 | if (!compat) |
141 | return csize; | 141 | return csize; |
142 | 142 | ||
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c index e690a2aa6fef..604ba966e1c9 100644 --- a/drivers/of/of_i2c.c +++ b/drivers/of/of_i2c.c | |||
@@ -69,7 +69,7 @@ EXPORT_SYMBOL(of_register_i2c_devices); | |||
69 | 69 | ||
70 | static int of_dev_node_match(struct device *dev, void *data) | 70 | static int of_dev_node_match(struct device *dev, void *data) |
71 | { | 71 | { |
72 | return dev_archdata_get_node(&dev->archdata) == data; | 72 | return dev->of_node == data; |
73 | } | 73 | } |
74 | 74 | ||
75 | /* must call put_device() when done with returned i2c_client device */ | 75 | /* must call put_device() when done with returned i2c_client device */ |
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 12090f57dc87..01d794abe105 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c | |||
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(of_mdiobus_register); | |||
101 | /* Helper function for of_phy_find_device */ | 101 | /* Helper function for of_phy_find_device */ |
102 | static int of_phy_match(struct device *dev, void *phy_np) | 102 | static int of_phy_match(struct device *dev, void *phy_np) |
103 | { | 103 | { |
104 | return dev_archdata_get_node(&dev->archdata) == phy_np; | 104 | return dev->of_node == phy_np; |
105 | } | 105 | } |
106 | 106 | ||
107 | /** | 107 | /** |
@@ -167,7 +167,7 @@ struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, | |||
167 | if (!dev->dev.parent) | 167 | if (!dev->dev.parent) |
168 | return NULL; | 168 | return NULL; |
169 | 169 | ||
170 | net_np = dev_archdata_get_node(&dev->dev.parent->archdata); | 170 | net_np = dev->dev.parent->of_node; |
171 | if (!net_np) | 171 | if (!net_np) |
172 | return NULL; | 172 | return NULL; |
173 | 173 | ||
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 2e59fe947d28..a22d32d71bf2 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
@@ -185,7 +185,7 @@ static int __devinit electra_cf_probe(struct of_device *ofdev, | |||
185 | const struct of_device_id *match) | 185 | const struct of_device_id *match) |
186 | { | 186 | { |
187 | struct device *device = &ofdev->dev; | 187 | struct device *device = &ofdev->dev; |
188 | struct device_node *np = ofdev->node; | 188 | struct device_node *np = ofdev->dev.of_node; |
189 | struct electra_cf_socket *cf; | 189 | struct electra_cf_socket *cf; |
190 | struct resource mem, io; | 190 | struct resource mem, io; |
191 | int status; | 191 | int status; |
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index b4951eb0358e..103fdf6b0b89 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c | |||
@@ -565,9 +565,9 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp) | |||
565 | int devidx = 0; | 565 | int devidx = 0; |
566 | 566 | ||
567 | while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { | 567 | while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { |
568 | if (!strcmp(op->node->name, "temperature")) | 568 | if (!strcmp(op->dev.of_node->name, "temperature")) |
569 | attach_one_temp(bp, op, temp_index++); | 569 | attach_one_temp(bp, op, temp_index++); |
570 | if (!strcmp(op->node->name, "fan-control")) | 570 | if (!strcmp(op->dev.of_node->name, "fan-control")) |
571 | attach_one_fan(bp, op, fan_index++); | 571 | attach_one_fan(bp, op, fan_index++); |
572 | } | 572 | } |
573 | if (temp_index != 0 && fan_index != 0) { | 573 | if (temp_index != 0 && fan_index != 0) { |
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 7e30e5f6e032..1543ac32b79b 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
@@ -97,7 +97,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device * | |||
97 | client->bp = bp; | 97 | client->bp = bp; |
98 | client->op = op; | 98 | client->op = op; |
99 | 99 | ||
100 | reg = of_get_property(op->node, "reg", NULL); | 100 | reg = of_get_property(op->dev.of_node, "reg", NULL); |
101 | if (!reg) { | 101 | if (!reg) { |
102 | kfree(client); | 102 | kfree(client); |
103 | return NULL; | 103 | return NULL; |
@@ -327,7 +327,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde | |||
327 | spin_lock_init(&bp->lock); | 327 | spin_lock_init(&bp->lock); |
328 | 328 | ||
329 | entry = 0; | 329 | entry = 0; |
330 | for (dp = op->node->child; | 330 | for (dp = op->dev.of_node->child; |
331 | dp && entry < 8; | 331 | dp && entry < 8; |
332 | dp = dp->sibling, entry++) { | 332 | dp = dp->sibling, entry++) { |
333 | struct of_device *child_op; | 333 | struct of_device *child_op; |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 3e59189f4137..7fc7f34f3466 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
@@ -216,7 +216,7 @@ static int __devinit d7s_probe(struct of_device *op, | |||
216 | writeb(regs, p->regs); | 216 | writeb(regs, p->regs); |
217 | 217 | ||
218 | printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n", | 218 | printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n", |
219 | op->node->full_name, | 219 | op->dev.of_node->full_name, |
220 | (regs & D7S_FLIP) ? " (FLIPPED)" : "", | 220 | (regs & D7S_FLIP) ? " (FLIPPED)" : "", |
221 | op->resource[0].start, | 221 | op->resource[0].start, |
222 | sol_compat ? "in sol_compat mode" : ""); | 222 | sol_compat ? "in sol_compat mode" : ""); |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index c6e2eff19409..a5fe20faf4f7 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -1043,7 +1043,7 @@ static int __devinit envctrl_probe(struct of_device *op, | |||
1043 | return -ENOMEM; | 1043 | return -ENOMEM; |
1044 | 1044 | ||
1045 | index = 0; | 1045 | index = 0; |
1046 | dp = op->node->child; | 1046 | dp = op->dev.of_node->child; |
1047 | while (dp) { | 1047 | while (dp) { |
1048 | if (!strcmp(dp->name, "gpio")) { | 1048 | if (!strcmp(dp->name, "gpio")) { |
1049 | i2c_childlist[index].i2ctype = I2C_GPIO; | 1049 | i2c_childlist[index].i2ctype = I2C_GPIO; |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 19f255b97c86..202ff8f75afb 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -162,7 +162,7 @@ static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; | |||
162 | static int __devinit flash_probe(struct of_device *op, | 162 | static int __devinit flash_probe(struct of_device *op, |
163 | const struct of_device_id *match) | 163 | const struct of_device_id *match) |
164 | { | 164 | { |
165 | struct device_node *dp = op->node; | 165 | struct device_node *dp = op->dev.of_node; |
166 | struct device_node *parent; | 166 | struct device_node *parent; |
167 | 167 | ||
168 | parent = dp->parent; | 168 | parent = dp->parent; |
@@ -184,7 +184,7 @@ static int __devinit flash_probe(struct of_device *op, | |||
184 | flash.busy = 0; | 184 | flash.busy = 0; |
185 | 185 | ||
186 | printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n", | 186 | printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n", |
187 | op->node->full_name, | 187 | op->dev.of_node->full_name, |
188 | flash.read_base, flash.read_size, | 188 | flash.read_base, flash.read_size, |
189 | flash.write_base, flash.write_size); | 189 | flash.write_base, flash.write_size); |
190 | 190 | ||
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 2c56fd56ec63..acc6738aa61f 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
@@ -382,7 +382,7 @@ static int __devinit uctrl_probe(struct of_device *op, | |||
382 | 382 | ||
383 | sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr); | 383 | sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr); |
384 | printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n", | 384 | printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n", |
385 | op->node->full_name, p->regs, p->irq); | 385 | op->dev.of_node->full_name, p->regs, p->irq); |
386 | uctrl_get_event_status(p); | 386 | uctrl_get_event_status(p); |
387 | uctrl_get_external_status(p); | 387 | uctrl_get_external_status(p); |
388 | 388 | ||
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index c2eea711a5ce..60cd4ec51eae 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -1157,7 +1157,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost) | |||
1157 | static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) | 1157 | static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) |
1158 | { | 1158 | { |
1159 | struct ibmvfc_npiv_login *login_info = &vhost->login_info; | 1159 | struct ibmvfc_npiv_login *login_info = &vhost->login_info; |
1160 | struct device_node *of_node = vhost->dev->archdata.of_node; | 1160 | struct device_node *of_node = vhost->dev->of_node; |
1161 | const char *location; | 1161 | const char *location; |
1162 | 1162 | ||
1163 | memset(login_info, 0, sizeof(*login_info)); | 1163 | memset(login_info, 0, sizeof(*login_info)); |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index ff5ec5ac1fb5..cc38fefc2612 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -957,7 +957,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata) | |||
957 | struct viosrp_capabilities *req; | 957 | struct viosrp_capabilities *req; |
958 | struct srp_event_struct *evt_struct; | 958 | struct srp_event_struct *evt_struct; |
959 | unsigned long flags; | 959 | unsigned long flags; |
960 | struct device_node *of_node = hostdata->dev->archdata.of_node; | 960 | struct device_node *of_node = hostdata->dev->of_node; |
961 | const char *location; | 961 | const char *location; |
962 | 962 | ||
963 | evt_struct = get_event_struct(&hostdata->pool); | 963 | evt_struct = get_event_struct(&hostdata->pool); |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index aa406497eebc..35433d23b7ce 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -755,7 +755,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) | |||
755 | struct of_device *op = qpti->op; | 755 | struct of_device *op = qpti->op; |
756 | struct device_node *dp; | 756 | struct device_node *dp; |
757 | 757 | ||
758 | dp = op->node; | 758 | dp = op->dev.of_node; |
759 | 759 | ||
760 | qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1); | 760 | qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1); |
761 | if (qpti->scsi_id == -1) | 761 | if (qpti->scsi_id == -1) |
@@ -776,8 +776,8 @@ static void qpti_get_bursts(struct qlogicpti *qpti) | |||
776 | struct of_device *op = qpti->op; | 776 | struct of_device *op = qpti->op; |
777 | u8 bursts, bmask; | 777 | u8 bursts, bmask; |
778 | 778 | ||
779 | bursts = of_getintprop_default(op->node, "burst-sizes", 0xff); | 779 | bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff); |
780 | bmask = of_getintprop_default(op->node->parent, "burst-sizes", 0xff); | 780 | bmask = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0xff); |
781 | if (bmask != 0xff) | 781 | if (bmask != 0xff) |
782 | bursts &= bmask; | 782 | bursts &= bmask; |
783 | if (bursts == 0xff || | 783 | if (bursts == 0xff || |
@@ -1293,7 +1293,7 @@ static struct scsi_host_template qpti_template = { | |||
1293 | static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1293 | static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) |
1294 | { | 1294 | { |
1295 | struct scsi_host_template *tpnt = match->data; | 1295 | struct scsi_host_template *tpnt = match->data; |
1296 | struct device_node *dp = op->node; | 1296 | struct device_node *dp = op->dev.of_node; |
1297 | struct Scsi_Host *host; | 1297 | struct Scsi_Host *host; |
1298 | struct qlogicpti *qpti; | 1298 | struct qlogicpti *qpti; |
1299 | static int nqptis; | 1299 | static int nqptis; |
@@ -1315,7 +1315,7 @@ static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_devic | |||
1315 | qpti->qhost = host; | 1315 | qpti->qhost = host; |
1316 | qpti->op = op; | 1316 | qpti->op = op; |
1317 | qpti->qpti_id = nqptis; | 1317 | qpti->qpti_id = nqptis; |
1318 | strcpy(qpti->prom_name, op->node->name); | 1318 | strcpy(qpti->prom_name, op->dev.of_node->name); |
1319 | qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); | 1319 | qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); |
1320 | 1320 | ||
1321 | if (qpti_map_regs(qpti) < 0) | 1321 | if (qpti_map_regs(qpti) < 0) |
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index fc23d273fb1a..151df73df475 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
@@ -125,7 +125,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) | |||
125 | struct of_device *op = esp->dev; | 125 | struct of_device *op = esp->dev; |
126 | struct device_node *dp; | 126 | struct device_node *dp; |
127 | 127 | ||
128 | dp = op->node; | 128 | dp = op->dev.of_node; |
129 | esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff); | 129 | esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff); |
130 | if (esp->scsi_id != 0xff) | 130 | if (esp->scsi_id != 0xff) |
131 | goto done; | 131 | goto done; |
@@ -134,7 +134,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) | |||
134 | if (esp->scsi_id != 0xff) | 134 | if (esp->scsi_id != 0xff) |
135 | goto done; | 135 | goto done; |
136 | 136 | ||
137 | esp->scsi_id = of_getintprop_default(espdma->node, | 137 | esp->scsi_id = of_getintprop_default(espdma->dev.of_node, |
138 | "scsi-initiator-id", 7); | 138 | "scsi-initiator-id", 7); |
139 | 139 | ||
140 | done: | 140 | done: |
@@ -147,7 +147,7 @@ static void __devinit esp_get_differential(struct esp *esp) | |||
147 | struct of_device *op = esp->dev; | 147 | struct of_device *op = esp->dev; |
148 | struct device_node *dp; | 148 | struct device_node *dp; |
149 | 149 | ||
150 | dp = op->node; | 150 | dp = op->dev.of_node; |
151 | if (of_find_property(dp, "differential", NULL)) | 151 | if (of_find_property(dp, "differential", NULL)) |
152 | esp->flags |= ESP_FLAG_DIFFERENTIAL; | 152 | esp->flags |= ESP_FLAG_DIFFERENTIAL; |
153 | else | 153 | else |
@@ -160,7 +160,7 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
160 | struct device_node *bus_dp, *dp; | 160 | struct device_node *bus_dp, *dp; |
161 | int fmhz; | 161 | int fmhz; |
162 | 162 | ||
163 | dp = op->node; | 163 | dp = op->dev.of_node; |
164 | bus_dp = dp->parent; | 164 | bus_dp = dp->parent; |
165 | 165 | ||
166 | fmhz = of_getintprop_default(dp, "clock-frequency", 0); | 166 | fmhz = of_getintprop_default(dp, "clock-frequency", 0); |
@@ -172,12 +172,12 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
172 | 172 | ||
173 | static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) | 173 | static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) |
174 | { | 174 | { |
175 | struct device_node *dma_dp = dma_of->node; | 175 | struct device_node *dma_dp = dma_of->dev.of_node; |
176 | struct of_device *op = esp->dev; | 176 | struct of_device *op = esp->dev; |
177 | struct device_node *dp; | 177 | struct device_node *dp; |
178 | u8 bursts, val; | 178 | u8 bursts, val; |
179 | 179 | ||
180 | dp = op->node; | 180 | dp = op->dev.of_node; |
181 | bursts = of_getintprop_default(dp, "burst-sizes", 0xff); | 181 | bursts = of_getintprop_default(dp, "burst-sizes", 0xff); |
182 | val = of_getintprop_default(dma_dp, "burst-sizes", 0xff); | 182 | val = of_getintprop_default(dma_dp, "burst-sizes", 0xff); |
183 | if (val != 0xff) | 183 | if (val != 0xff) |
@@ -565,7 +565,7 @@ fail: | |||
565 | static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) | 565 | static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) |
566 | { | 566 | { |
567 | struct device_node *dma_node = NULL; | 567 | struct device_node *dma_node = NULL; |
568 | struct device_node *dp = op->node; | 568 | struct device_node *dp = op->dev.of_node; |
569 | struct of_device *dma_of = NULL; | 569 | struct of_device *dma_of = NULL; |
570 | int hme = 0; | 570 | int hme = 0; |
571 | 571 | ||
@@ -574,7 +574,7 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device | |||
574 | !strcmp(dp->parent->name, "dma"))) | 574 | !strcmp(dp->parent->name, "dma"))) |
575 | dma_node = dp->parent; | 575 | dma_node = dp->parent; |
576 | else if (!strcmp(dp->name, "SUNW,fas")) { | 576 | else if (!strcmp(dp->name, "SUNW,fas")) { |
577 | dma_node = op->node; | 577 | dma_node = op->dev.of_node; |
578 | hme = 1; | 578 | hme = 1; |
579 | } | 579 | } |
580 | if (dma_node) | 580 | if (dma_node) |
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c index fe91319b5f65..52015d7031bb 100644 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c | |||
@@ -559,7 +559,7 @@ static int __devinit apbuart_probe(struct of_device *op, | |||
559 | 559 | ||
560 | i = 0; | 560 | i = 0; |
561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { | 561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { |
562 | if (op->node == grlib_apbuart_nodes[i]) | 562 | if (op->dev.of_node == grlib_apbuart_nodes[i]) |
563 | break; | 563 | break; |
564 | } | 564 | } |
565 | 565 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 300cea768d74..7866cdf8a754 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -1342,7 +1342,7 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev, | |||
1342 | /* initialize the device pointer for the port */ | 1342 | /* initialize the device pointer for the port */ |
1343 | pinfo->port.dev = &ofdev->dev; | 1343 | pinfo->port.dev = &ofdev->dev; |
1344 | 1344 | ||
1345 | ret = cpm_uart_init_port(ofdev->node, pinfo); | 1345 | ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo); |
1346 | if (ret) | 1346 | if (ret) |
1347 | return ret; | 1347 | return ret; |
1348 | 1348 | ||
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 3119fddaedb5..cb079387c5ae 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -1328,14 +1328,14 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1328 | 1328 | ||
1329 | /* Check validity & presence */ | 1329 | /* Check validity & presence */ |
1330 | for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++) | 1330 | for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++) |
1331 | if (mpc52xx_uart_nodes[idx] == op->node) | 1331 | if (mpc52xx_uart_nodes[idx] == op->dev.of_node) |
1332 | break; | 1332 | break; |
1333 | if (idx >= MPC52xx_PSC_MAXNUM) | 1333 | if (idx >= MPC52xx_PSC_MAXNUM) |
1334 | return -EINVAL; | 1334 | return -EINVAL; |
1335 | pr_debug("Found %s assigned to ttyPSC%x\n", | 1335 | pr_debug("Found %s assigned to ttyPSC%x\n", |
1336 | mpc52xx_uart_nodes[idx]->full_name, idx); | 1336 | mpc52xx_uart_nodes[idx]->full_name, idx); |
1337 | 1337 | ||
1338 | uartclk = psc_ops->getuartclk(op->node); | 1338 | uartclk = psc_ops->getuartclk(op->dev.of_node); |
1339 | if (uartclk == 0) { | 1339 | if (uartclk == 0) { |
1340 | dev_dbg(&op->dev, "Could not find uart clock frequency!\n"); | 1340 | dev_dbg(&op->dev, "Could not find uart clock frequency!\n"); |
1341 | return -EINVAL; | 1341 | return -EINVAL; |
@@ -1355,7 +1355,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1355 | port->dev = &op->dev; | 1355 | port->dev = &op->dev; |
1356 | 1356 | ||
1357 | /* Search for IRQ and mapbase */ | 1357 | /* Search for IRQ and mapbase */ |
1358 | ret = of_address_to_resource(op->node, 0, &res); | 1358 | ret = of_address_to_resource(op->dev.of_node, 0, &res); |
1359 | if (ret) | 1359 | if (ret) |
1360 | return ret; | 1360 | return ret; |
1361 | 1361 | ||
@@ -1365,7 +1365,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1365 | return -EINVAL; | 1365 | return -EINVAL; |
1366 | } | 1366 | } |
1367 | 1367 | ||
1368 | psc_ops->get_irq(port, op->node); | 1368 | psc_ops->get_irq(port, op->dev.of_node); |
1369 | if (port->irq == NO_IRQ) { | 1369 | if (port->irq == NO_IRQ) { |
1370 | dev_dbg(&op->dev, "Could not get irq\n"); | 1370 | dev_dbg(&op->dev, "Could not get irq\n"); |
1371 | return -EINVAL; | 1371 | return -EINVAL; |
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c index e1ab8ec0a4a6..3c02fa96f282 100644 --- a/drivers/serial/nwpserial.c +++ b/drivers/serial/nwpserial.c | |||
@@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port) | |||
344 | 344 | ||
345 | mutex_lock(&nwpserial_mutex); | 345 | mutex_lock(&nwpserial_mutex); |
346 | 346 | ||
347 | dn = to_of_device(port->dev)->node; | 347 | dn = to_of_device(port->dev)->dev.of_node; |
348 | if (dn == NULL) | 348 | if (dn == NULL) |
349 | goto out; | 349 | goto out; |
350 | 350 | ||
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 4abfebdb0fcc..29539805e593 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -31,7 +31,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, | |||
31 | int type, struct uart_port *port) | 31 | int type, struct uart_port *port) |
32 | { | 32 | { |
33 | struct resource resource; | 33 | struct resource resource; |
34 | struct device_node *np = ofdev->node; | 34 | struct device_node *np = ofdev->dev.of_node; |
35 | const unsigned int *clk, *spd; | 35 | const unsigned int *clk, *spd; |
36 | const u32 *prop; | 36 | const u32 *prop; |
37 | int ret, prop_size; | 37 | int ret, prop_size; |
@@ -88,7 +88,7 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev, | |||
88 | int port_type; | 88 | int port_type; |
89 | int ret; | 89 | int ret; |
90 | 90 | ||
91 | if (of_find_property(ofdev->node, "used-by-rtas", NULL)) | 91 | if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL)) |
92 | return -EBUSY; | 92 | return -EBUSY; |
93 | 93 | ||
94 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 94 | info = kmalloc(sizeof(*info), GFP_KERNEL); |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 4eaa043ca2a8..1e43bf59c44d 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -1609,7 +1609,7 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1609 | /* Iterate the pmz_ports array to find a matching entry | 1609 | /* Iterate the pmz_ports array to find a matching entry |
1610 | */ | 1610 | */ |
1611 | for (i = 0; i < MAX_ZS_PORTS; i++) | 1611 | for (i = 0; i < MAX_ZS_PORTS; i++) |
1612 | if (pmz_ports[i].node == mdev->ofdev.node) { | 1612 | if (pmz_ports[i].node == mdev->ofdev.dev.of_node) { |
1613 | struct uart_pmac_port *uap = &pmz_ports[i]; | 1613 | struct uart_pmac_port *uap = &pmz_ports[i]; |
1614 | 1614 | ||
1615 | uap->dev = mdev; | 1615 | uap->dev = mdev; |
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index d14cca7fb88d..d1eedf13d85c 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -565,7 +565,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m | |||
565 | if (err) | 565 | if (err) |
566 | goto out_free_con_read_page; | 566 | goto out_free_con_read_page; |
567 | 567 | ||
568 | sunserial_console_match(&sunhv_console, op->node, | 568 | sunserial_console_match(&sunhv_console, op->dev.of_node, |
569 | &sunhv_reg, port->line, false); | 569 | &sunhv_reg, port->line, false); |
570 | 570 | ||
571 | err = uart_add_one_port(&sunhv_reg, port); | 571 | err = uart_add_one_port(&sunhv_reg, port); |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index d2e0321049e2..9176c41b74ad 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options) | |||
883 | printk("Console: ttyS%d (SAB82532)\n", | 883 | printk("Console: ttyS%d (SAB82532)\n", |
884 | (sunsab_reg.minor - 64) + con->index); | 884 | (sunsab_reg.minor - 64) + con->index); |
885 | 885 | ||
886 | sunserial_console_termios(con, to_of_device(up->port.dev)->node); | 886 | sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); |
887 | 887 | ||
888 | switch (con->cflag & CBAUD) { | 888 | switch (con->cflag & CBAUD) { |
889 | case B150: baud = 150; break; | 889 | case B150: baud = 150; break; |
@@ -1026,11 +1026,11 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * | |||
1026 | if (err) | 1026 | if (err) |
1027 | goto out1; | 1027 | goto out1; |
1028 | 1028 | ||
1029 | sunserial_console_match(SUNSAB_CONSOLE(), op->node, | 1029 | sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node, |
1030 | &sunsab_reg, up[0].port.line, | 1030 | &sunsab_reg, up[0].port.line, |
1031 | false); | 1031 | false); |
1032 | 1032 | ||
1033 | sunserial_console_match(SUNSAB_CONSOLE(), op->node, | 1033 | sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node, |
1034 | &sunsab_reg, up[1].port.line, | 1034 | &sunsab_reg, up[1].port.line, |
1035 | false); | 1035 | false); |
1036 | 1036 | ||
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 01f7731e59b8..a647b2448071 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1200,7 +1200,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up) | |||
1200 | return -ENODEV; | 1200 | return -ENODEV; |
1201 | 1201 | ||
1202 | printk("%s: %s port at %llx, irq %u\n", | 1202 | printk("%s: %s port at %llx, irq %u\n", |
1203 | to_of_device(up->port.dev)->node->full_name, | 1203 | to_of_device(up->port.dev)->dev.of_node->full_name, |
1204 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", | 1204 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", |
1205 | (unsigned long long) up->port.mapbase, | 1205 | (unsigned long long) up->port.mapbase, |
1206 | up->port.irq); | 1206 | up->port.irq); |
@@ -1352,7 +1352,7 @@ static int __init sunsu_console_setup(struct console *co, char *options) | |||
1352 | spin_lock_init(&port->lock); | 1352 | spin_lock_init(&port->lock); |
1353 | 1353 | ||
1354 | /* Get firmware console settings. */ | 1354 | /* Get firmware console settings. */ |
1355 | sunserial_console_termios(co, to_of_device(port->dev)->node); | 1355 | sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node); |
1356 | 1356 | ||
1357 | memset(&termios, 0, sizeof(struct ktermios)); | 1357 | memset(&termios, 0, sizeof(struct ktermios)); |
1358 | termios.c_cflag = co->cflag; | 1358 | termios.c_cflag = co->cflag; |
@@ -1409,7 +1409,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp) | |||
1409 | static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) | 1409 | static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) |
1410 | { | 1410 | { |
1411 | static int inst; | 1411 | static int inst; |
1412 | struct device_node *dp = op->node; | 1412 | struct device_node *dp = op->dev.of_node; |
1413 | struct uart_sunsu_port *up; | 1413 | struct uart_sunsu_port *up; |
1414 | struct resource *rp; | 1414 | struct resource *rp; |
1415 | enum su_type type; | 1415 | enum su_type type; |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 2c7a66af4f52..20f9be8cd949 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -1180,7 +1180,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options) | |||
1180 | (sunzilog_reg.minor - 64) + con->index, con->index); | 1180 | (sunzilog_reg.minor - 64) + con->index, con->index); |
1181 | 1181 | ||
1182 | /* Get firmware console settings. */ | 1182 | /* Get firmware console settings. */ |
1183 | sunserial_console_termios(con, to_of_device(up->port.dev)->node); | 1183 | sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); |
1184 | 1184 | ||
1185 | /* Firmware console speed is limited to 150-->38400 baud so | 1185 | /* Firmware console speed is limited to 150-->38400 baud so |
1186 | * this hackish cflag thing is OK. | 1186 | * this hackish cflag thing is OK. |
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
1358 | int keyboard_mouse = 0; | 1358 | int keyboard_mouse = 0; |
1359 | int err; | 1359 | int err; |
1360 | 1360 | ||
1361 | if (of_find_property(op->node, "keyboard", NULL)) | 1361 | if (of_find_property(op->dev.of_node, "keyboard", NULL)) |
1362 | keyboard_mouse = 1; | 1362 | keyboard_mouse = 1; |
1363 | 1363 | ||
1364 | /* uarts must come before keyboards/mice */ | 1364 | /* uarts must come before keyboards/mice */ |
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
1415 | sunzilog_init_hw(&up[1]); | 1415 | sunzilog_init_hw(&up[1]); |
1416 | 1416 | ||
1417 | if (!keyboard_mouse) { | 1417 | if (!keyboard_mouse) { |
1418 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | 1418 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node, |
1419 | &sunzilog_reg, up[0].port.line, | 1419 | &sunzilog_reg, up[0].port.line, |
1420 | false)) | 1420 | false)) |
1421 | up->flags |= SUNZILOG_FLAG_IS_CONS; | 1421 | up->flags |= SUNZILOG_FLAG_IS_CONS; |
@@ -1425,7 +1425,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
1425 | rp, sizeof(struct zilog_layout)); | 1425 | rp, sizeof(struct zilog_layout)); |
1426 | return err; | 1426 | return err; |
1427 | } | 1427 | } |
1428 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | 1428 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node, |
1429 | &sunzilog_reg, up[1].port.line, | 1429 | &sunzilog_reg, up[1].port.line, |
1430 | false)) | 1430 | false)) |
1431 | up->flags |= SUNZILOG_FLAG_IS_CONS; | 1431 | up->flags |= SUNZILOG_FLAG_IS_CONS; |
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index f0a6c61b17f7..8fc2583d06ff 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c | |||
@@ -591,15 +591,15 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match) | |||
591 | 591 | ||
592 | dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match); | 592 | dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match); |
593 | 593 | ||
594 | rc = of_address_to_resource(op->node, 0, &res); | 594 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
595 | if (rc) { | 595 | if (rc) { |
596 | dev_err(&op->dev, "invalid address\n"); | 596 | dev_err(&op->dev, "invalid address\n"); |
597 | return rc; | 597 | return rc; |
598 | } | 598 | } |
599 | 599 | ||
600 | irq = irq_of_parse_and_map(op->node, 0); | 600 | irq = irq_of_parse_and_map(op->dev.of_node, 0); |
601 | 601 | ||
602 | id = of_get_property(op->node, "port-number", NULL); | 602 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
603 | 603 | ||
604 | return ulite_assign(&op->dev, id ? *id : -1, res.start+3, irq); | 604 | return ulite_assign(&op->dev, id ? *id : -1, res.start+3, irq); |
605 | } | 605 | } |
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 074904912f64..529890f044e2 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
@@ -1197,7 +1197,7 @@ static void uart_firmware_cont(const struct firmware *fw, void *context) | |||
1197 | static int ucc_uart_probe(struct of_device *ofdev, | 1197 | static int ucc_uart_probe(struct of_device *ofdev, |
1198 | const struct of_device_id *match) | 1198 | const struct of_device_id *match) |
1199 | { | 1199 | { |
1200 | struct device_node *np = ofdev->node; | 1200 | struct device_node *np = ofdev->dev.of_node; |
1201 | const unsigned int *iprop; /* Integer OF properties */ | 1201 | const unsigned int *iprop; /* Integer OF properties */ |
1202 | const char *sprop; /* String OF properties */ | 1202 | const char *sprop; /* String OF properties */ |
1203 | struct uart_qe_port *qe_port = NULL; | 1203 | struct uart_qe_port *qe_port = NULL; |
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index 77d4cc88edea..7fcf28405860 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c | |||
@@ -472,18 +472,18 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
472 | s16 id = -1; | 472 | s16 id = -1; |
473 | int rc; | 473 | int rc; |
474 | 474 | ||
475 | regaddr_p = of_get_address(op->node, 0, &size64, NULL); | 475 | regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL); |
476 | if (!regaddr_p) { | 476 | if (!regaddr_p) { |
477 | dev_err(&op->dev, "Invalid PSC address\n"); | 477 | dev_err(&op->dev, "Invalid PSC address\n"); |
478 | return -EINVAL; | 478 | return -EINVAL; |
479 | } | 479 | } |
480 | regaddr64 = of_translate_address(op->node, regaddr_p); | 480 | regaddr64 = of_translate_address(op->dev.of_node, regaddr_p); |
481 | 481 | ||
482 | /* get PSC id (1..6, used by port_config) */ | 482 | /* get PSC id (1..6, used by port_config) */ |
483 | if (op->dev.platform_data == NULL) { | 483 | if (op->dev.platform_data == NULL) { |
484 | const u32 *psc_nump; | 484 | const u32 *psc_nump; |
485 | 485 | ||
486 | psc_nump = of_get_property(op->node, "cell-index", NULL); | 486 | psc_nump = of_get_property(op->dev.of_node, "cell-index", NULL); |
487 | if (!psc_nump || *psc_nump > 5) { | 487 | if (!psc_nump || *psc_nump > 5) { |
488 | dev_err(&op->dev, "Invalid cell-index property\n"); | 488 | dev_err(&op->dev, "Invalid cell-index property\n"); |
489 | return -EINVAL; | 489 | return -EINVAL; |
@@ -492,9 +492,10 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
492 | } | 492 | } |
493 | 493 | ||
494 | rc = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, | 494 | rc = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, |
495 | irq_of_parse_and_map(op->node, 0), id); | 495 | irq_of_parse_and_map(op->dev.of_node, 0), id); |
496 | if (rc == 0) | 496 | if (rc == 0) |
497 | of_register_spi_devices(dev_get_drvdata(&op->dev), op->node); | 497 | of_register_spi_devices(dev_get_drvdata(&op->dev), |
498 | op->dev.of_node); | ||
498 | 499 | ||
499 | return rc; | 500 | return rc; |
500 | } | 501 | } |
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index cd68f1ce5cc3..6573233bf7c9 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c | |||
@@ -403,7 +403,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
403 | 403 | ||
404 | /* MMIO registers */ | 404 | /* MMIO registers */ |
405 | dev_dbg(&op->dev, "probing mpc5200 SPI device\n"); | 405 | dev_dbg(&op->dev, "probing mpc5200 SPI device\n"); |
406 | regs = of_iomap(op->node, 0); | 406 | regs = of_iomap(op->dev.of_node, 0); |
407 | if (!regs) | 407 | if (!regs) |
408 | return -ENODEV; | 408 | return -ENODEV; |
409 | 409 | ||
@@ -445,11 +445,11 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
445 | ms = spi_master_get_devdata(master); | 445 | ms = spi_master_get_devdata(master); |
446 | ms->master = master; | 446 | ms->master = master; |
447 | ms->regs = regs; | 447 | ms->regs = regs; |
448 | ms->irq0 = irq_of_parse_and_map(op->node, 0); | 448 | ms->irq0 = irq_of_parse_and_map(op->dev.of_node, 0); |
449 | ms->irq1 = irq_of_parse_and_map(op->node, 1); | 449 | ms->irq1 = irq_of_parse_and_map(op->dev.of_node, 1); |
450 | ms->state = mpc52xx_spi_fsmstate_idle; | 450 | ms->state = mpc52xx_spi_fsmstate_idle; |
451 | ms->ipb_freq = mpc5xxx_get_bus_frequency(op->node); | 451 | ms->ipb_freq = mpc5xxx_get_bus_frequency(op->dev.of_node); |
452 | ms->gpio_cs_count = of_gpio_count(op->node); | 452 | ms->gpio_cs_count = of_gpio_count(op->dev.of_node); |
453 | if (ms->gpio_cs_count > 0) { | 453 | if (ms->gpio_cs_count > 0) { |
454 | master->num_chipselect = ms->gpio_cs_count; | 454 | master->num_chipselect = ms->gpio_cs_count; |
455 | ms->gpio_cs = kmalloc(ms->gpio_cs_count * sizeof(unsigned int), | 455 | ms->gpio_cs = kmalloc(ms->gpio_cs_count * sizeof(unsigned int), |
@@ -460,7 +460,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
460 | } | 460 | } |
461 | 461 | ||
462 | for (i = 0; i < ms->gpio_cs_count; i++) { | 462 | for (i = 0; i < ms->gpio_cs_count; i++) { |
463 | gpio_cs = of_get_gpio(op->node, i); | 463 | gpio_cs = of_get_gpio(op->dev.of_node, i); |
464 | if (gpio_cs < 0) { | 464 | if (gpio_cs < 0) { |
465 | dev_err(&op->dev, | 465 | dev_err(&op->dev, |
466 | "could not parse the gpio field " | 466 | "could not parse the gpio field " |
@@ -512,7 +512,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
512 | if (rc) | 512 | if (rc) |
513 | goto err_register; | 513 | goto err_register; |
514 | 514 | ||
515 | of_register_spi_devices(master, op->node); | 515 | of_register_spi_devices(master, op->dev.of_node); |
516 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); | 516 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); |
517 | 517 | ||
518 | return rc; | 518 | return rc; |
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 14d052316502..7572f98a419e 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c | |||
@@ -797,7 +797,7 @@ static void mpc8xxx_spi_free_dummy_rx(void) | |||
797 | static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi) | 797 | static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi) |
798 | { | 798 | { |
799 | struct device *dev = mspi->dev; | 799 | struct device *dev = mspi->dev; |
800 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 800 | struct device_node *np = dev->of_node; |
801 | const u32 *iprop; | 801 | const u32 *iprop; |
802 | int size; | 802 | int size; |
803 | unsigned long spi_base_ofs; | 803 | unsigned long spi_base_ofs; |
@@ -851,7 +851,7 @@ static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi) | |||
851 | static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi) | 851 | static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi) |
852 | { | 852 | { |
853 | struct device *dev = mspi->dev; | 853 | struct device *dev = mspi->dev; |
854 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 854 | struct device_node *np = dev->of_node; |
855 | const u32 *iprop; | 855 | const u32 *iprop; |
856 | int size; | 856 | int size; |
857 | unsigned long pram_ofs; | 857 | unsigned long pram_ofs; |
@@ -1123,7 +1123,7 @@ static void mpc8xxx_spi_cs_control(struct spi_device *spi, bool on) | |||
1123 | 1123 | ||
1124 | static int of_mpc8xxx_spi_get_chipselects(struct device *dev) | 1124 | static int of_mpc8xxx_spi_get_chipselects(struct device *dev) |
1125 | { | 1125 | { |
1126 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 1126 | struct device_node *np = dev->of_node; |
1127 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 1127 | struct fsl_spi_platform_data *pdata = dev->platform_data; |
1128 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); | 1128 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); |
1129 | unsigned int ngpios; | 1129 | unsigned int ngpios; |
@@ -1224,7 +1224,7 @@ static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev, | |||
1224 | const struct of_device_id *ofid) | 1224 | const struct of_device_id *ofid) |
1225 | { | 1225 | { |
1226 | struct device *dev = &ofdev->dev; | 1226 | struct device *dev = &ofdev->dev; |
1227 | struct device_node *np = ofdev->node; | 1227 | struct device_node *np = ofdev->dev.of_node; |
1228 | struct mpc8xxx_spi_probe_info *pinfo; | 1228 | struct mpc8xxx_spi_probe_info *pinfo; |
1229 | struct fsl_spi_platform_data *pdata; | 1229 | struct fsl_spi_platform_data *pdata; |
1230 | struct spi_master *master; | 1230 | struct spi_master *master; |
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 8df33b8a634c..ad0662354a5e 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c | |||
@@ -108,7 +108,7 @@ ppc44x_enable_bmt(struct device_node *dn) | |||
108 | static int __devinit | 108 | static int __devinit |
109 | ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | 109 | ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) |
110 | { | 110 | { |
111 | struct device_node *dn = op->node; | 111 | struct device_node *dn = op->dev.of_node; |
112 | struct usb_hcd *hcd; | 112 | struct usb_hcd *hcd; |
113 | struct ehci_hcd *ehci = NULL; | 113 | struct ehci_hcd *ehci = NULL; |
114 | struct resource res; | 114 | struct resource res; |
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index 15379c636143..6135732d8057 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c | |||
@@ -565,7 +565,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev, | |||
565 | const struct of_device_id *ofid) | 565 | const struct of_device_id *ofid) |
566 | { | 566 | { |
567 | struct device *dev = &ofdev->dev; | 567 | struct device *dev = &ofdev->dev; |
568 | struct device_node *node = ofdev->node; | 568 | struct device_node *node = dev->of_node; |
569 | struct usb_hcd *hcd; | 569 | struct usb_hcd *hcd; |
570 | struct fhci_hcd *fhci; | 570 | struct fhci_hcd *fhci; |
571 | struct resource usb_regs; | 571 | struct resource usb_regs; |
@@ -670,7 +670,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev, | |||
670 | } | 670 | } |
671 | 671 | ||
672 | for (j = 0; j < NUM_PINS; j++) { | 672 | for (j = 0; j < NUM_PINS; j++) { |
673 | fhci->pins[j] = qe_pin_request(ofdev->node, j); | 673 | fhci->pins[j] = qe_pin_request(node, j); |
674 | if (IS_ERR(fhci->pins[j])) { | 674 | if (IS_ERR(fhci->pins[j])) { |
675 | ret = PTR_ERR(fhci->pins[j]); | 675 | ret = PTR_ERR(fhci->pins[j]); |
676 | dev_err(dev, "can't get pin %d: %d\n", j, ret); | 676 | dev_err(dev, "can't get pin %d: %d\n", j, ret); |
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index 4293cfd28d61..36360e24a9b9 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -31,7 +31,7 @@ static int of_isp1760_probe(struct of_device *dev, | |||
31 | const struct of_device_id *match) | 31 | const struct of_device_id *match) |
32 | { | 32 | { |
33 | struct usb_hcd *hcd; | 33 | struct usb_hcd *hcd; |
34 | struct device_node *dp = dev->node; | 34 | struct device_node *dp = dev->dev.of_node; |
35 | struct resource *res; | 35 | struct resource *res; |
36 | struct resource memory; | 36 | struct resource memory; |
37 | struct of_irq oirq; | 37 | struct of_irq oirq; |
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 103263c230cf..003aea21c35e 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c | |||
@@ -83,7 +83,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = { | |||
83 | static int __devinit | 83 | static int __devinit |
84 | ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | 84 | ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) |
85 | { | 85 | { |
86 | struct device_node *dn = op->node; | 86 | struct device_node *dn = op->dev.of_node; |
87 | struct usb_hcd *hcd; | 87 | struct usb_hcd *hcd; |
88 | struct ohci_hcd *ohci; | 88 | struct ohci_hcd *ohci; |
89 | struct resource res; | 89 | struct resource res; |
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 6d0fcb43696e..7f59b0fe5dc2 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c | |||
@@ -740,7 +740,7 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info, | |||
740 | static int __devinit cg6_probe(struct of_device *op, | 740 | static int __devinit cg6_probe(struct of_device *op, |
741 | const struct of_device_id *match) | 741 | const struct of_device_id *match) |
742 | { | 742 | { |
743 | struct device_node *dp = op->node; | 743 | struct device_node *dp = op->dev.of_node; |
744 | struct fb_info *info; | 744 | struct fb_info *info; |
745 | struct cg6_par *par; | 745 | struct cg6_par *par; |
746 | int linebytes, err; | 746 | int linebytes, err; |
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index a42fabab69df..ddd46f71e250 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c | |||
@@ -896,7 +896,7 @@ static void ffb_init_fix(struct fb_info *info) | |||
896 | static int __devinit ffb_probe(struct of_device *op, | 896 | static int __devinit ffb_probe(struct of_device *op, |
897 | const struct of_device_id *match) | 897 | const struct of_device_id *match) |
898 | { | 898 | { |
899 | struct device_node *dp = op->node; | 899 | struct device_node *dp = op->dev.of_node; |
900 | struct ffb_fbc __iomem *fbc; | 900 | struct ffb_fbc __iomem *fbc; |
901 | struct ffb_dac __iomem *dac; | 901 | struct ffb_dac __iomem *dac; |
902 | struct fb_info *info; | 902 | struct fb_info *info; |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 994358a4f302..930a2522a631 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -1421,7 +1421,7 @@ static ssize_t show_monitor(struct device *device, | |||
1421 | static int __devinit fsl_diu_probe(struct of_device *ofdev, | 1421 | static int __devinit fsl_diu_probe(struct of_device *ofdev, |
1422 | const struct of_device_id *match) | 1422 | const struct of_device_id *match) |
1423 | { | 1423 | { |
1424 | struct device_node *np = ofdev->node; | 1424 | struct device_node *np = ofdev->dev.of_node; |
1425 | struct mfb_info *mfbi; | 1425 | struct mfb_info *mfbi; |
1426 | phys_addr_t dummy_ad_addr; | 1426 | phys_addr_t dummy_ad_addr; |
1427 | int ret, i, error = 0; | 1427 | int ret, i, error = 0; |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 8a204e7a5b5b..69d78d50f0f6 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
@@ -536,7 +536,7 @@ static int __init platinumfb_setup(char *options) | |||
536 | static int __devinit platinumfb_probe(struct of_device* odev, | 536 | static int __devinit platinumfb_probe(struct of_device* odev, |
537 | const struct of_device_id *match) | 537 | const struct of_device_id *match) |
538 | { | 538 | { |
539 | struct device_node *dp = odev->node; | 539 | struct device_node *dp = odev->dev.of_node; |
540 | struct fb_info *info; | 540 | struct fb_info *info; |
541 | struct fb_info_platinum *pinfo; | 541 | struct fb_info_platinum *pinfo; |
542 | volatile __u8 *fbuffer; | 542 | volatile __u8 *fbuffer; |
diff --git a/drivers/video/sunxvr1000.c b/drivers/video/sunxvr1000.c index 23e69e834a18..ad92a200fafa 100644 --- a/drivers/video/sunxvr1000.c +++ b/drivers/video/sunxvr1000.c | |||
@@ -114,7 +114,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp) | |||
114 | static int __devinit gfb_probe(struct of_device *op, | 114 | static int __devinit gfb_probe(struct of_device *op, |
115 | const struct of_device_id *match) | 115 | const struct of_device_id *match) |
116 | { | 116 | { |
117 | struct device_node *dp = op->node; | 117 | struct device_node *dp = op->dev.of_node; |
118 | struct fb_info *info; | 118 | struct fb_info *info; |
119 | struct gfb_info *gp; | 119 | struct gfb_info *gp; |
120 | int err; | 120 | int err; |
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index 3fcb83f03881..6fcec553662c 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c | |||
@@ -423,7 +423,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match) | |||
423 | * To check whether the core is connected directly to DCR or PLB | 423 | * To check whether the core is connected directly to DCR or PLB |
424 | * interface and initialize the tft_access accordingly. | 424 | * interface and initialize the tft_access accordingly. |
425 | */ | 425 | */ |
426 | p = (u32 *)of_get_property(op->node, "xlnx,dcr-splb-slave-if", NULL); | 426 | p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL); |
427 | tft_access = p ? *p : 0; | 427 | tft_access = p ? *p : 0; |
428 | 428 | ||
429 | /* | 429 | /* |
@@ -432,41 +432,41 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match) | |||
432 | */ | 432 | */ |
433 | if (tft_access) { | 433 | if (tft_access) { |
434 | drvdata->flags |= PLB_ACCESS_FLAG; | 434 | drvdata->flags |= PLB_ACCESS_FLAG; |
435 | rc = of_address_to_resource(op->node, 0, &res); | 435 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
436 | if (rc) { | 436 | if (rc) { |
437 | dev_err(&op->dev, "invalid address\n"); | 437 | dev_err(&op->dev, "invalid address\n"); |
438 | goto err; | 438 | goto err; |
439 | } | 439 | } |
440 | } else { | 440 | } else { |
441 | res.start = 0; | 441 | res.start = 0; |
442 | start = dcr_resource_start(op->node, 0); | 442 | start = dcr_resource_start(op->dev.of_node, 0); |
443 | drvdata->dcr_len = dcr_resource_len(op->node, 0); | 443 | drvdata->dcr_len = dcr_resource_len(op->dev.of_node, 0); |
444 | drvdata->dcr_host = dcr_map(op->node, start, drvdata->dcr_len); | 444 | drvdata->dcr_host = dcr_map(op->dev.of_node, start, drvdata->dcr_len); |
445 | if (!DCR_MAP_OK(drvdata->dcr_host)) { | 445 | if (!DCR_MAP_OK(drvdata->dcr_host)) { |
446 | dev_err(&op->dev, "invalid DCR address\n"); | 446 | dev_err(&op->dev, "invalid DCR address\n"); |
447 | goto err; | 447 | goto err; |
448 | } | 448 | } |
449 | } | 449 | } |
450 | 450 | ||
451 | prop = of_get_property(op->node, "phys-size", &size); | 451 | prop = of_get_property(op->dev.of_node, "phys-size", &size); |
452 | if ((prop) && (size >= sizeof(u32)*2)) { | 452 | if ((prop) && (size >= sizeof(u32)*2)) { |
453 | pdata.screen_width_mm = prop[0]; | 453 | pdata.screen_width_mm = prop[0]; |
454 | pdata.screen_height_mm = prop[1]; | 454 | pdata.screen_height_mm = prop[1]; |
455 | } | 455 | } |
456 | 456 | ||
457 | prop = of_get_property(op->node, "resolution", &size); | 457 | prop = of_get_property(op->dev.of_node, "resolution", &size); |
458 | if ((prop) && (size >= sizeof(u32)*2)) { | 458 | if ((prop) && (size >= sizeof(u32)*2)) { |
459 | pdata.xres = prop[0]; | 459 | pdata.xres = prop[0]; |
460 | pdata.yres = prop[1]; | 460 | pdata.yres = prop[1]; |
461 | } | 461 | } |
462 | 462 | ||
463 | prop = of_get_property(op->node, "virtual-resolution", &size); | 463 | prop = of_get_property(op->dev.of_node, "virtual-resolution", &size); |
464 | if ((prop) && (size >= sizeof(u32)*2)) { | 464 | if ((prop) && (size >= sizeof(u32)*2)) { |
465 | pdata.xvirt = prop[0]; | 465 | pdata.xvirt = prop[0]; |
466 | pdata.yvirt = prop[1]; | 466 | pdata.yvirt = prop[1]; |
467 | } | 467 | } |
468 | 468 | ||
469 | if (of_find_property(op->node, "rotate-display", NULL)) | 469 | if (of_find_property(op->dev.of_node, "rotate-display", NULL)) |
470 | pdata.rotate_screen = 1; | 470 | pdata.rotate_screen = 1; |
471 | 471 | ||
472 | dev_set_drvdata(&op->dev, drvdata); | 472 | dev_set_drvdata(&op->dev, drvdata); |
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index ba2efce4b40e..2fcc3cf7ef62 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -577,7 +577,7 @@ static int __devinit cpwd_probe(struct of_device *op, | |||
577 | * interrupt_mask register cannot be written, so no timer | 577 | * interrupt_mask register cannot be written, so no timer |
578 | * interrupts can be masked within the PLD. | 578 | * interrupts can be masked within the PLD. |
579 | */ | 579 | */ |
580 | str_prop = of_get_property(op->node, "model", NULL); | 580 | str_prop = of_get_property(op->dev.of_node, "model", NULL); |
581 | p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL)); | 581 | p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL)); |
582 | 582 | ||
583 | if (!p->enabled) | 583 | if (!p->enabled) |
diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index 1cd9b301df03..3fd1a7e24928 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c | |||
@@ -992,7 +992,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) | |||
992 | return -ENODEV; | 992 | return -ENODEV; |
993 | 993 | ||
994 | /* by breaking out we keep a reference */ | 994 | /* by breaking out we keep a reference */ |
995 | while ((sound = of_get_next_child(sdev->ofdev.node, sound))) { | 995 | while ((sound = of_get_next_child(sdev->ofdev.dev.of_node, sound))) { |
996 | if (sound->type && strcasecmp(sound->type, "soundchip") == 0) | 996 | if (sound->type && strcasecmp(sound->type, "soundchip") == 0) |
997 | break; | 997 | break; |
998 | } | 998 | } |
diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c index fa8ab2815a98..99ca7120e269 100644 --- a/sound/aoa/soundbus/core.c +++ b/sound/aoa/soundbus/core.c | |||
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
74 | of = &soundbus_dev->ofdev; | 74 | of = &soundbus_dev->ofdev; |
75 | 75 | ||
76 | /* stuff we want to pass to /sbin/hotplug */ | 76 | /* stuff we want to pass to /sbin/hotplug */ |
77 | retval = add_uevent_var(env, "OF_NAME=%s", of->node->name); | 77 | retval = add_uevent_var(env, "OF_NAME=%s", of->dev.of_node->name); |
78 | if (retval) | 78 | if (retval) |
79 | return retval; | 79 | return retval; |
80 | 80 | ||
81 | retval = add_uevent_var(env, "OF_TYPE=%s", of->node->type); | 81 | retval = add_uevent_var(env, "OF_TYPE=%s", of->dev.of_node->type); |
82 | if (retval) | 82 | if (retval) |
83 | return retval; | 83 | return retval; |
84 | 84 | ||
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
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(of->node, "compatible", &cplen); | 89 | compat = of_get_property(of->dev.of_node, "compatible", &cplen); |
90 | while (compat && cplen > 0) { | 90 | while (compat && cplen > 0) { |
91 | int tmp = env->buflen; | 91 | int tmp = env->buflen; |
92 | retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat); | 92 | retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat); |
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev) | |||
169 | 169 | ||
170 | /* sanity checks */ | 170 | /* sanity checks */ |
171 | if (!dev->attach_codec || | 171 | if (!dev->attach_codec || |
172 | !dev->ofdev.node || | 172 | !dev->ofdev.dev.of_node || |
173 | dev->pcmname || | 173 | dev->pcmname || |
174 | dev->pcmid != -1) { | 174 | dev->pcmid != -1) { |
175 | printk(KERN_ERR "soundbus: adding device failed sanity check!\n"); | 175 | printk(KERN_ERR "soundbus: adding device failed sanity check!\n"); |
diff --git a/sound/aoa/soundbus/i2sbus/control.c b/sound/aoa/soundbus/i2sbus/control.c index 47f854c2001f..4dc9b49c02cf 100644 --- a/sound/aoa/soundbus/i2sbus/control.c +++ b/sound/aoa/soundbus/i2sbus/control.c | |||
@@ -42,7 +42,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, | |||
42 | { | 42 | { |
43 | struct device_node *np; | 43 | struct device_node *np; |
44 | 44 | ||
45 | np = i2sdev->sound.ofdev.node; | 45 | np = i2sdev->sound.ofdev.dev.of_node; |
46 | i2sdev->enable = pmf_find_function(np, "enable"); | 46 | i2sdev->enable = pmf_find_function(np, "enable"); |
47 | i2sdev->cell_enable = pmf_find_function(np, "cell-enable"); | 47 | i2sdev->cell_enable = pmf_find_function(np, "cell-enable"); |
48 | i2sdev->clock_enable = pmf_find_function(np, "clock-enable"); | 48 | i2sdev->clock_enable = pmf_find_function(np, "clock-enable"); |
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 9d6f3b176ed1..7672b4d145ae 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c | |||
@@ -221,8 +221,8 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
221 | 221 | ||
222 | mutex_init(&dev->lock); | 222 | mutex_init(&dev->lock); |
223 | spin_lock_init(&dev->low_lock); | 223 | spin_lock_init(&dev->low_lock); |
224 | dev->sound.ofdev.node = np; | ||
225 | dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; | 224 | dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; |
225 | dev->sound.ofdev.dev.of_node = np; | ||
226 | dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; | 226 | dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; |
227 | dev->sound.ofdev.dev.parent = &macio->ofdev.dev; | 227 | dev->sound.ofdev.dev.parent = &macio->ofdev.dev; |
228 | dev->sound.ofdev.dev.release = i2sbus_release_dev; | 228 | dev->sound.ofdev.dev.release = i2sbus_release_dev; |
@@ -346,7 +346,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match) | |||
346 | return -ENODEV; | 346 | return -ENODEV; |
347 | } | 347 | } |
348 | 348 | ||
349 | while ((np = of_get_next_child(dev->ofdev.node, np))) { | 349 | while ((np = of_get_next_child(dev->ofdev.dev.of_node, np))) { |
350 | if (of_device_is_compatible(np, "i2sbus") || | 350 | if (of_device_is_compatible(np, "i2sbus") || |
351 | of_device_is_compatible(np, "i2s-modem")) { | 351 | of_device_is_compatible(np, "i2s-modem")) { |
352 | got += i2sbus_add_dev(dev, control, np); | 352 | got += i2sbus_add_dev(dev, control, np); |
diff --git a/sound/aoa/soundbus/sysfs.c b/sound/aoa/soundbus/sysfs.c index f580942b5c09..6496e754f00a 100644 --- a/sound/aoa/soundbus/sysfs.c +++ b/sound/aoa/soundbus/sysfs.c | |||
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ | |||
9 | char *buf) \ | 9 | char *buf) \ |
10 | { \ | 10 | { \ |
11 | struct soundbus_dev *mdev = to_soundbus_device (dev); \ | 11 | struct soundbus_dev *mdev = to_soundbus_device (dev); \ |
12 | return sprintf (buf, format_string, mdev->ofdev.node->field); \ | 12 | return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ |
13 | } | 13 | } |
14 | 14 | ||
15 | static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | 15 | static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, |
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
25 | length = strlen(buf); | 25 | length = strlen(buf); |
26 | } else { | 26 | } else { |
27 | length = sprintf(buf, "of:N%sT%s\n", | 27 | length = sprintf(buf, "of:N%sT%s\n", |
28 | of->node->name, of->node->type); | 28 | of->dev.of_node->name, of->dev.of_node->type); |
29 | } | 29 | } |
30 | 30 | ||
31 | return length; | 31 | return length; |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index d639e55c5124..1d4e7164e80a 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -380,8 +380,8 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
380 | int ret; | 380 | int ret; |
381 | 381 | ||
382 | /* Fetch the registers and IRQ of the PSC */ | 382 | /* Fetch the registers and IRQ of the PSC */ |
383 | irq = irq_of_parse_and_map(op->node, 0); | 383 | irq = irq_of_parse_and_map(op->dev.of_node, 0); |
384 | if (of_address_to_resource(op->node, 0, &res)) { | 384 | if (of_address_to_resource(op->dev.of_node, 0, &res)) { |
385 | dev_err(&op->dev, "Missing reg property\n"); | 385 | dev_err(&op->dev, "Missing reg property\n"); |
386 | return -ENODEV; | 386 | return -ENODEV; |
387 | } | 387 | } |
@@ -399,7 +399,7 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
399 | } | 399 | } |
400 | 400 | ||
401 | /* Get the PSC ID */ | 401 | /* Get the PSC ID */ |
402 | prop = of_get_property(op->node, "cell-index", &size); | 402 | prop = of_get_property(op->dev.of_node, "cell-index", &size); |
403 | if (!prop || size < sizeof *prop) { | 403 | if (!prop || size < sizeof *prop) { |
404 | ret = -ENODEV; | 404 | ret = -ENODEV; |
405 | goto out_free; | 405 | goto out_free; |
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index ce8de90fb94a..748cc0f0df38 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c | |||
@@ -181,7 +181,7 @@ static int __devinit psc_i2s_of_probe(struct of_device *op, | |||
181 | 181 | ||
182 | /* Check for the codec handle. If it is not present then we | 182 | /* Check for the codec handle. If it is not present then we |
183 | * are done */ | 183 | * are done */ |
184 | if (!of_get_property(op->node, "codec-handle", NULL)) | 184 | if (!of_get_property(op->dev.of_node, "codec-handle", NULL)) |
185 | return 0; | 185 | return 0; |
186 | 186 | ||
187 | /* Due to errata in the dma mode; need to line up enabling | 187 | /* Due to errata in the dma mode; need to line up enabling |
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index 83de1c81c8c4..e3f78f255a60 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -203,7 +203,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = { | |||
203 | static int mpc8610_hpcd_probe(struct of_device *ofdev, | 203 | static int mpc8610_hpcd_probe(struct of_device *ofdev, |
204 | const struct of_device_id *match) | 204 | const struct of_device_id *match) |
205 | { | 205 | { |
206 | struct device_node *np = ofdev->node; | 206 | struct device_node *np = ofdev->dev.of_node; |
207 | struct device_node *codec_np = NULL; | 207 | struct device_node *codec_np = NULL; |
208 | struct device_node *guts_np = NULL; | 208 | struct device_node *guts_np = NULL; |
209 | struct device_node *dma_np = NULL; | 209 | struct device_node *dma_np = NULL; |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 7dcc06512e86..6a4c872e00df 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -2075,12 +2075,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev | |||
2075 | static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) | 2075 | static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) |
2076 | { | 2076 | { |
2077 | #ifdef EBUS_SUPPORT | 2077 | #ifdef EBUS_SUPPORT |
2078 | if (!strcmp(op->node->parent->name, "ebus")) | 2078 | if (!strcmp(op->dev.of_node->parent->name, "ebus")) |
2079 | return cs4231_ebus_probe(op, match); | 2079 | return cs4231_ebus_probe(op, match); |
2080 | #endif | 2080 | #endif |
2081 | #ifdef SBUS_SUPPORT | 2081 | #ifdef SBUS_SUPPORT |
2082 | if (!strcmp(op->node->parent->name, "sbus") || | 2082 | if (!strcmp(op->dev.of_node->parent->name, "sbus") || |
2083 | !strcmp(op->node->parent->name, "sbi")) | 2083 | !strcmp(op->dev.of_node->parent->name, "sbi")) |
2084 | return cs4231_sbus_probe(op, match); | 2084 | return cs4231_sbus_probe(op, match); |
2085 | #endif | 2085 | #endif |
2086 | return -ENODEV; | 2086 | return -ENODEV; |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 2eab6ce48852..1b5192eb5ae5 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -2651,7 +2651,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_id | |||
2651 | 2651 | ||
2652 | printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n", | 2652 | printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n", |
2653 | dev, dbri->regs, | 2653 | dev, dbri->regs, |
2654 | dbri->irq, op->node->name[9], dbri->mm.version); | 2654 | dbri->irq, op->dev.of_node->name[9], dbri->mm.version); |
2655 | dev++; | 2655 | dev++; |
2656 | 2656 | ||
2657 | return 0; | 2657 | return 0; |