diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:44 -0400 |
commit | 61c7a080a5a061c976988fd4b844dfb468dda255 (patch) | |
tree | 8cb492b73f2755c38a6164d770da34d5af6486a0 /drivers/net/ibm_newemac/zmii.c | |
parent | d12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff) |
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.
(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/net/ibm_newemac/zmii.c')
-rw-r--r-- | drivers/net/ibm_newemac/zmii.c | 9 |
1 files changed, 5 insertions, 4 deletions
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 | ||