diff options
author | Ezequiel GarcĂa <ezequiel@vanguardiasur.com.ar> | 2014-09-20 12:53:13 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-09-22 14:38:18 -0400 |
commit | d2f08c7521cd67bc5f3c990af87add7b02f46ebe (patch) | |
tree | a6e14c0f0da8370f32c320925e840a97ccb57eb0 /drivers/mtd | |
parent | 93af53b8633c4cb474585158512182b21219d743 (diff) |
nand: omap2: Replace pr_err with dev_err
Usage of pr_err is frowned upon, so replace it with dev_err.
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/omap2.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index f97a4ffd489d..3b357e920a0c 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c | |||
@@ -1375,7 +1375,7 @@ static int omap_elm_correct_data(struct mtd_info *mtd, u_char *data, | |||
1375 | erased_ecc_vec = bch16_vector; | 1375 | erased_ecc_vec = bch16_vector; |
1376 | break; | 1376 | break; |
1377 | default: | 1377 | default: |
1378 | pr_err("invalid driver configuration\n"); | 1378 | dev_err(&info->pdev->dev, "invalid driver configuration\n"); |
1379 | return -EINVAL; | 1379 | return -EINVAL; |
1380 | } | 1380 | } |
1381 | 1381 | ||
@@ -1446,7 +1446,8 @@ static int omap_elm_correct_data(struct mtd_info *mtd, u_char *data, | |||
1446 | err = 0; | 1446 | err = 0; |
1447 | for (i = 0; i < eccsteps; i++) { | 1447 | for (i = 0; i < eccsteps; i++) { |
1448 | if (err_vec[i].error_uncorrectable) { | 1448 | if (err_vec[i].error_uncorrectable) { |
1449 | pr_err("nand: uncorrectable bit-flips found\n"); | 1449 | dev_err(&info->pdev->dev, |
1450 | "uncorrectable bit-flips found\n"); | ||
1450 | err = -EBADMSG; | 1451 | err = -EBADMSG; |
1451 | } else if (err_vec[i].error_reported) { | 1452 | } else if (err_vec[i].error_reported) { |
1452 | for (j = 0; j < err_vec[i].error_count; j++) { | 1453 | for (j = 0; j < err_vec[i].error_count; j++) { |
@@ -1483,8 +1484,9 @@ static int omap_elm_correct_data(struct mtd_info *mtd, u_char *data, | |||
1483 | 1 << bit_pos; | 1484 | 1 << bit_pos; |
1484 | } | 1485 | } |
1485 | } else { | 1486 | } else { |
1486 | pr_err("invalid bit-flip @ %d:%d\n", | 1487 | dev_err(&info->pdev->dev, |
1487 | byte_pos, bit_pos); | 1488 | "invalid bit-flip @ %d:%d\n", |
1489 | byte_pos, bit_pos); | ||
1488 | err = -EBADMSG; | 1490 | err = -EBADMSG; |
1489 | } | 1491 | } |
1490 | } | 1492 | } |
@@ -1598,13 +1600,13 @@ static bool is_elm_present(struct omap_nand_info *info, | |||
1598 | 1600 | ||
1599 | /* check whether elm-id is passed via DT */ | 1601 | /* check whether elm-id is passed via DT */ |
1600 | if (!elm_node) { | 1602 | if (!elm_node) { |
1601 | pr_err("nand: error: ELM DT node not found\n"); | 1603 | dev_err(&info->pdev->dev, "ELM devicetree node not found\n"); |
1602 | return false; | 1604 | return false; |
1603 | } | 1605 | } |
1604 | pdev = of_find_device_by_node(elm_node); | 1606 | pdev = of_find_device_by_node(elm_node); |
1605 | /* check whether ELM device is registered */ | 1607 | /* check whether ELM device is registered */ |
1606 | if (!pdev) { | 1608 | if (!pdev) { |
1607 | pr_err("nand: error: ELM device not found\n"); | 1609 | dev_err(&info->pdev->dev, "ELM device not found\n"); |
1608 | return false; | 1610 | return false; |
1609 | } | 1611 | } |
1610 | /* ELM module available, now configure it */ | 1612 | /* ELM module available, now configure it */ |
@@ -1734,14 +1736,14 @@ static int omap_nand_probe(struct platform_device *pdev) | |||
1734 | /* scan NAND device connected to chip controller */ | 1736 | /* scan NAND device connected to chip controller */ |
1735 | nand_chip->options |= pdata->devsize & NAND_BUSWIDTH_16; | 1737 | nand_chip->options |= pdata->devsize & NAND_BUSWIDTH_16; |
1736 | if (nand_scan_ident(mtd, 1, NULL)) { | 1738 | if (nand_scan_ident(mtd, 1, NULL)) { |
1737 | pr_err("nand device scan failed, may be bus-width mismatch\n"); | 1739 | dev_err(&info->pdev->dev, "scan failed, may be bus-width mismatch\n"); |
1738 | err = -ENXIO; | 1740 | err = -ENXIO; |
1739 | goto return_error; | 1741 | goto return_error; |
1740 | } | 1742 | } |
1741 | 1743 | ||
1742 | /* check for small page devices */ | 1744 | /* check for small page devices */ |
1743 | if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) { | 1745 | if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) { |
1744 | pr_err("small page devices are not supported\n"); | 1746 | dev_err(&info->pdev->dev, "small page devices are not supported\n"); |
1745 | err = -EINVAL; | 1747 | err = -EINVAL; |
1746 | goto return_error; | 1748 | goto return_error; |
1747 | } | 1749 | } |
@@ -1896,8 +1898,9 @@ static int omap_nand_probe(struct platform_device *pdev) | |||
1896 | nand_chip->ecc.bytes, | 1898 | nand_chip->ecc.bytes, |
1897 | &ecclayout); | 1899 | &ecclayout); |
1898 | if (!nand_chip->ecc.priv) { | 1900 | if (!nand_chip->ecc.priv) { |
1899 | pr_err("nand: error: unable to use s/w BCH library\n"); | 1901 | dev_err(&info->pdev->dev, "unable to use BCH library\n"); |
1900 | err = -EINVAL; | 1902 | err = -EINVAL; |
1903 | goto return_error; | ||
1901 | } | 1904 | } |
1902 | break; | 1905 | break; |
1903 | 1906 | ||
@@ -1959,7 +1962,7 @@ static int omap_nand_probe(struct platform_device *pdev) | |||
1959 | nand_chip->ecc.bytes, | 1962 | nand_chip->ecc.bytes, |
1960 | &ecclayout); | 1963 | &ecclayout); |
1961 | if (!nand_chip->ecc.priv) { | 1964 | if (!nand_chip->ecc.priv) { |
1962 | pr_err("nand: error: unable to use s/w BCH library\n"); | 1965 | dev_err(&info->pdev->dev, "unable to use BCH library\n"); |
1963 | err = -EINVAL; | 1966 | err = -EINVAL; |
1964 | goto return_error; | 1967 | goto return_error; |
1965 | } | 1968 | } |
@@ -2026,7 +2029,7 @@ static int omap_nand_probe(struct platform_device *pdev) | |||
2026 | ecclayout->eccpos[ecclayout->eccbytes - 1] + 1; | 2029 | ecclayout->eccpos[ecclayout->eccbytes - 1] + 1; |
2027 | break; | 2030 | break; |
2028 | default: | 2031 | default: |
2029 | pr_err("nand: error: invalid or unsupported ECC scheme\n"); | 2032 | dev_err(&info->pdev->dev, "invalid or unsupported ECC scheme\n"); |
2030 | err = -EINVAL; | 2033 | err = -EINVAL; |
2031 | goto return_error; | 2034 | goto return_error; |
2032 | } | 2035 | } |
@@ -2038,8 +2041,9 @@ static int omap_nand_probe(struct platform_device *pdev) | |||
2038 | ecclayout->oobfree->length = mtd->oobsize - ecclayout->oobfree->offset; | 2041 | ecclayout->oobfree->length = mtd->oobsize - ecclayout->oobfree->offset; |
2039 | /* check if NAND device's OOB is enough to store ECC signatures */ | 2042 | /* check if NAND device's OOB is enough to store ECC signatures */ |
2040 | if (mtd->oobsize < (ecclayout->eccbytes + BADBLOCK_MARKER_LENGTH)) { | 2043 | if (mtd->oobsize < (ecclayout->eccbytes + BADBLOCK_MARKER_LENGTH)) { |
2041 | pr_err("not enough OOB bytes required = %d, available=%d\n", | 2044 | dev_err(&info->pdev->dev, |
2042 | ecclayout->eccbytes, mtd->oobsize); | 2045 | "not enough OOB bytes required = %d, available=%d\n", |
2046 | ecclayout->eccbytes, mtd->oobsize); | ||
2043 | err = -EINVAL; | 2047 | err = -EINVAL; |
2044 | goto return_error; | 2048 | goto return_error; |
2045 | } | 2049 | } |