diff options
-rw-r--r-- | drivers/spi/spi-orion.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi.c | 27 |
2 files changed, 13 insertions, 18 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 28fc9f161b9d..4b6dd73b80da 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c | |||
@@ -669,8 +669,8 @@ static int orion_spi_probe(struct platform_device *pdev) | |||
669 | status = of_property_read_u32(np, "reg", &cs); | 669 | status = of_property_read_u32(np, "reg", &cs); |
670 | if (status) { | 670 | if (status) { |
671 | dev_err(&pdev->dev, | 671 | dev_err(&pdev->dev, |
672 | "%s has no valid 'reg' property (%d)\n", | 672 | "%pOF has no valid 'reg' property (%d)\n", |
673 | np->full_name, status); | 673 | np, status); |
674 | status = 0; | 674 | status = 0; |
675 | continue; | 675 | continue; |
676 | } | 676 | } |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 4fcbb0aa71d3..0725c78b0de6 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -1583,8 +1583,8 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, | |||
1583 | 1583 | ||
1584 | if (spi_controller_is_slave(ctlr)) { | 1584 | if (spi_controller_is_slave(ctlr)) { |
1585 | if (strcmp(nc->name, "slave")) { | 1585 | if (strcmp(nc->name, "slave")) { |
1586 | dev_err(&ctlr->dev, "%s is not called 'slave'\n", | 1586 | dev_err(&ctlr->dev, "%pOF is not called 'slave'\n", |
1587 | nc->full_name); | 1587 | nc); |
1588 | return -EINVAL; | 1588 | return -EINVAL; |
1589 | } | 1589 | } |
1590 | return 0; | 1590 | return 0; |
@@ -1593,8 +1593,8 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, | |||
1593 | /* Device address */ | 1593 | /* Device address */ |
1594 | rc = of_property_read_u32(nc, "reg", &value); | 1594 | rc = of_property_read_u32(nc, "reg", &value); |
1595 | if (rc) { | 1595 | if (rc) { |
1596 | dev_err(&ctlr->dev, "%s has no valid 'reg' property (%d)\n", | 1596 | dev_err(&ctlr->dev, "%pOF has no valid 'reg' property (%d)\n", |
1597 | nc->full_name, rc); | 1597 | nc, rc); |
1598 | return rc; | 1598 | return rc; |
1599 | } | 1599 | } |
1600 | spi->chip_select = value; | 1600 | spi->chip_select = value; |
@@ -1603,8 +1603,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, | |||
1603 | rc = of_property_read_u32(nc, "spi-max-frequency", &value); | 1603 | rc = of_property_read_u32(nc, "spi-max-frequency", &value); |
1604 | if (rc) { | 1604 | if (rc) { |
1605 | dev_err(&ctlr->dev, | 1605 | dev_err(&ctlr->dev, |
1606 | "%s has no valid 'spi-max-frequency' property (%d)\n", | 1606 | "%pOF has no valid 'spi-max-frequency' property (%d)\n", nc, rc); |
1607 | nc->full_name, rc); | ||
1608 | return rc; | 1607 | return rc; |
1609 | } | 1608 | } |
1610 | spi->max_speed_hz = value; | 1609 | spi->max_speed_hz = value; |
@@ -1621,8 +1620,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc) | |||
1621 | /* Alloc an spi_device */ | 1620 | /* Alloc an spi_device */ |
1622 | spi = spi_alloc_device(ctlr); | 1621 | spi = spi_alloc_device(ctlr); |
1623 | if (!spi) { | 1622 | if (!spi) { |
1624 | dev_err(&ctlr->dev, "spi_device alloc error for %s\n", | 1623 | dev_err(&ctlr->dev, "spi_device alloc error for %pOF\n", nc); |
1625 | nc->full_name); | ||
1626 | rc = -ENOMEM; | 1624 | rc = -ENOMEM; |
1627 | goto err_out; | 1625 | goto err_out; |
1628 | } | 1626 | } |
@@ -1631,8 +1629,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc) | |||
1631 | rc = of_modalias_node(nc, spi->modalias, | 1629 | rc = of_modalias_node(nc, spi->modalias, |
1632 | sizeof(spi->modalias)); | 1630 | sizeof(spi->modalias)); |
1633 | if (rc < 0) { | 1631 | if (rc < 0) { |
1634 | dev_err(&ctlr->dev, "cannot find modalias for %s\n", | 1632 | dev_err(&ctlr->dev, "cannot find modalias for %pOF\n", nc); |
1635 | nc->full_name); | ||
1636 | goto err_out; | 1633 | goto err_out; |
1637 | } | 1634 | } |
1638 | 1635 | ||
@@ -1647,8 +1644,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc) | |||
1647 | /* Register the new device */ | 1644 | /* Register the new device */ |
1648 | rc = spi_add_device(spi); | 1645 | rc = spi_add_device(spi); |
1649 | if (rc) { | 1646 | if (rc) { |
1650 | dev_err(&ctlr->dev, "spi_device register error %s\n", | 1647 | dev_err(&ctlr->dev, "spi_device register error %pOF\n", nc); |
1651 | nc->full_name); | ||
1652 | goto err_of_node_put; | 1648 | goto err_of_node_put; |
1653 | } | 1649 | } |
1654 | 1650 | ||
@@ -1682,8 +1678,7 @@ static void of_register_spi_devices(struct spi_controller *ctlr) | |||
1682 | spi = of_register_spi_device(ctlr, nc); | 1678 | spi = of_register_spi_device(ctlr, nc); |
1683 | if (IS_ERR(spi)) { | 1679 | if (IS_ERR(spi)) { |
1684 | dev_warn(&ctlr->dev, | 1680 | dev_warn(&ctlr->dev, |
1685 | "Failed to create SPI device for %s\n", | 1681 | "Failed to create SPI device for %pOF\n", nc); |
1686 | nc->full_name); | ||
1687 | of_node_clear_flag(nc, OF_POPULATED); | 1682 | of_node_clear_flag(nc, OF_POPULATED); |
1688 | } | 1683 | } |
1689 | } | 1684 | } |
@@ -3311,8 +3306,8 @@ static int of_spi_notify(struct notifier_block *nb, unsigned long action, | |||
3311 | put_device(&ctlr->dev); | 3306 | put_device(&ctlr->dev); |
3312 | 3307 | ||
3313 | if (IS_ERR(spi)) { | 3308 | if (IS_ERR(spi)) { |
3314 | pr_err("%s: failed to create for '%s'\n", | 3309 | pr_err("%s: failed to create for '%pOF'\n", |
3315 | __func__, rd->dn->full_name); | 3310 | __func__, rd->dn); |
3316 | of_node_clear_flag(rd->dn, OF_POPULATED); | 3311 | of_node_clear_flag(rd->dn, OF_POPULATED); |
3317 | return notifier_from_errno(PTR_ERR(spi)); | 3312 | return notifier_from_errno(PTR_ERR(spi)); |
3318 | } | 3313 | } |