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/sunhme.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/sunhme.c')
-rw-r--r-- | drivers/net/sunhme.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 | ||