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