diff options
author | Rob Herring <robh@kernel.org> | 2017-07-18 17:43:12 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-09-01 02:42:52 -0400 |
commit | b6a945ae03fd3962b51b27ecedf4f1dd7e034229 (patch) | |
tree | 1462bec56b191c6c89e641a6c442798b42eec908 | |
parent | 859420e3155d8192b31a93cd92d32c85151bf8da (diff) |
macintosh: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: Rob Herring <robh@kernel.org>
[mpe: Also convert the two cases inside #if 0]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | drivers/macintosh/macio_sysfs.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/rack-meter.c | 12 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/via-cuda.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_fcu_controls.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_lm87_sensor.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_sat.c | 2 |
7 files changed, 18 insertions, 18 deletions
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index 2445274f7e4b..281f5345661e 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c | |||
@@ -52,7 +52,7 @@ static ssize_t devspec_show(struct device *dev, | |||
52 | struct platform_device *ofdev; | 52 | struct platform_device *ofdev; |
53 | 53 | ||
54 | ofdev = to_platform_device(dev); | 54 | ofdev = to_platform_device(dev); |
55 | return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); | 55 | return sprintf(buf, "%pOF\n", ofdev->dev.of_node); |
56 | } | 56 | } |
57 | static DEVICE_ATTR_RO(modalias); | 57 | static DEVICE_ATTR_RO(modalias); |
58 | static DEVICE_ATTR_RO(devspec); | 58 | static DEVICE_ATTR_RO(devspec); |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 35582eb271e9..910b5b6f96b1 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -411,16 +411,16 @@ static int rackmeter_probe(struct macio_dev* mdev, | |||
411 | #if 0 /* Use that when i2s-a is finally an mdev per-se */ | 411 | #if 0 /* Use that when i2s-a is finally an mdev per-se */ |
412 | if (macio_resource_count(mdev) < 2 || macio_irq_count(mdev) < 2) { | 412 | if (macio_resource_count(mdev) < 2 || macio_irq_count(mdev) < 2) { |
413 | printk(KERN_ERR | 413 | printk(KERN_ERR |
414 | "rackmeter: found match but lacks resources: %s" | 414 | "rackmeter: found match but lacks resources: %pOF" |
415 | " (%d resources, %d interrupts)\n", | 415 | " (%d resources, %d interrupts)\n", |
416 | mdev->ofdev.node->full_name); | 416 | mdev->ofdev.dev.of_node); |
417 | rc = -ENXIO; | 417 | rc = -ENXIO; |
418 | goto bail_free; | 418 | goto bail_free; |
419 | } | 419 | } |
420 | if (macio_request_resources(mdev, "rackmeter")) { | 420 | if (macio_request_resources(mdev, "rackmeter")) { |
421 | printk(KERN_ERR | 421 | printk(KERN_ERR |
422 | "rackmeter: failed to request resources: %s\n", | 422 | "rackmeter: failed to request resources: %pOF\n", |
423 | mdev->ofdev.node->full_name); | 423 | mdev->ofdev.dev.of_node); |
424 | rc = -EBUSY; | 424 | rc = -EBUSY; |
425 | goto bail_free; | 425 | goto bail_free; |
426 | } | 426 | } |
@@ -431,8 +431,8 @@ static int rackmeter_probe(struct macio_dev* mdev, | |||
431 | of_address_to_resource(i2s, 0, &ri2s) || | 431 | of_address_to_resource(i2s, 0, &ri2s) || |
432 | of_address_to_resource(i2s, 1, &rdma)) { | 432 | of_address_to_resource(i2s, 1, &rdma)) { |
433 | printk(KERN_ERR | 433 | printk(KERN_ERR |
434 | "rackmeter: found match but lacks resources: %s", | 434 | "rackmeter: found match but lacks resources: %pOF", |
435 | mdev->ofdev.dev.of_node->full_name); | 435 | mdev->ofdev.dev.of_node); |
436 | rc = -ENXIO; | 436 | rc = -ENXIO; |
437 | goto bail_free; | 437 | goto bail_free; |
438 | } | 438 | } |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 1ac66421877a..ea9bdc85a21d 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -589,14 +589,14 @@ static int smu_late_init(void) | |||
589 | if (smu->db_node) { | 589 | if (smu->db_node) { |
590 | smu->db_irq = irq_of_parse_and_map(smu->db_node, 0); | 590 | smu->db_irq = irq_of_parse_and_map(smu->db_node, 0); |
591 | if (!smu->db_irq) | 591 | if (!smu->db_irq) |
592 | printk(KERN_ERR "smu: failed to map irq for node %s\n", | 592 | printk(KERN_ERR "smu: failed to map irq for node %pOF\n", |
593 | smu->db_node->full_name); | 593 | smu->db_node); |
594 | } | 594 | } |
595 | if (smu->msg_node) { | 595 | if (smu->msg_node) { |
596 | smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0); | 596 | smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0); |
597 | if (!smu->msg_irq) | 597 | if (!smu->msg_irq) |
598 | printk(KERN_ERR "smu: failed to map irq for node %s\n", | 598 | printk(KERN_ERR "smu: failed to map irq for node %pOF\n", |
599 | smu->msg_node->full_name); | 599 | smu->msg_node); |
600 | } | 600 | } |
601 | 601 | ||
602 | /* | 602 | /* |
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index c60415958dfe..147da4edd021 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c | |||
@@ -297,8 +297,8 @@ static int __init via_cuda_start(void) | |||
297 | #else | 297 | #else |
298 | cuda_irq = irq_of_parse_and_map(vias, 0); | 298 | cuda_irq = irq_of_parse_and_map(vias, 0); |
299 | if (!cuda_irq) { | 299 | if (!cuda_irq) { |
300 | printk(KERN_ERR "via-cuda: can't map interrupts for %s\n", | 300 | printk(KERN_ERR "via-cuda: can't map interrupts for %pOF\n", |
301 | vias->full_name); | 301 | vias); |
302 | return -ENODEV; | 302 | return -ENODEV; |
303 | } | 303 | } |
304 | #endif | 304 | #endif |
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c index 0226b796a21c..fab7a21e9577 100644 --- a/drivers/macintosh/windfarm_fcu_controls.c +++ b/drivers/macintosh/windfarm_fcu_controls.c | |||
@@ -470,8 +470,8 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv) | |||
470 | id = ((*reg) - 0x30) / 2; | 470 | id = ((*reg) - 0x30) / 2; |
471 | if (id > 7) { | 471 | if (id > 7) { |
472 | pr_warning("wf_fcu: Can't parse " | 472 | pr_warning("wf_fcu: Can't parse " |
473 | "fan ID in device-tree for %s\n", | 473 | "fan ID in device-tree for %pOF\n", |
474 | np->full_name); | 474 | np); |
475 | break; | 475 | break; |
476 | } | 476 | } |
477 | wf_fcu_add_fan(pv, name, type, id); | 477 | wf_fcu_add_fan(pv, name, type, id); |
diff --git a/drivers/macintosh/windfarm_lm87_sensor.c b/drivers/macintosh/windfarm_lm87_sensor.c index c071aab79dd1..913c4bfeef94 100644 --- a/drivers/macintosh/windfarm_lm87_sensor.c +++ b/drivers/macintosh/windfarm_lm87_sensor.c | |||
@@ -126,8 +126,8 @@ static int wf_lm87_probe(struct i2c_client *client, | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | if (!name) { | 128 | if (!name) { |
129 | pr_warning("wf_lm87: Unsupported sensor %s\n", | 129 | pr_warning("wf_lm87: Unsupported sensor %pOF\n", |
130 | client->dev.of_node->full_name); | 130 | client->dev.of_node); |
131 | return -ENODEV; | 131 | return -ENODEV; |
132 | } | 132 | } |
133 | 133 | ||
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index ad6223e88340..e9c828bf171b 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c | |||
@@ -248,7 +248,7 @@ static int wf_sat_probe(struct i2c_client *client, | |||
248 | core = loc[5] - '0'; | 248 | core = loc[5] - '0'; |
249 | if (chip > 1 || core > 1) { | 249 | if (chip > 1 || core > 1) { |
250 | printk(KERN_ERR "wf_sat_create: don't understand " | 250 | printk(KERN_ERR "wf_sat_create: don't understand " |
251 | "location %s for %s\n", loc, child->full_name); | 251 | "location %s for %pOF\n", loc, child); |
252 | continue; | 252 | continue; |
253 | } | 253 | } |
254 | cpu = 2 * chip + core; | 254 | cpu = 2 * chip + core; |