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>
This commit is contained in:
Ezequiel García 2014-09-20 17:53:13 +01:00 committed by Brian Norris
parent 93af53b863
commit d2f08c7521
1 changed files with 17 additions and 13 deletions

View File

@ -1375,7 +1375,7 @@ static int omap_elm_correct_data(struct mtd_info *mtd, u_char *data,
erased_ecc_vec = bch16_vector; erased_ecc_vec = bch16_vector;
break; break;
default: default:
pr_err("invalid driver configuration\n"); dev_err(&info->pdev->dev, "invalid driver configuration\n");
return -EINVAL; return -EINVAL;
} }
@ -1446,7 +1446,8 @@ static int omap_elm_correct_data(struct mtd_info *mtd, u_char *data,
err = 0; err = 0;
for (i = 0; i < eccsteps; i++) { for (i = 0; i < eccsteps; i++) {
if (err_vec[i].error_uncorrectable) { if (err_vec[i].error_uncorrectable) {
pr_err("nand: uncorrectable bit-flips found\n"); dev_err(&info->pdev->dev,
"uncorrectable bit-flips found\n");
err = -EBADMSG; err = -EBADMSG;
} else if (err_vec[i].error_reported) { } else if (err_vec[i].error_reported) {
for (j = 0; j < err_vec[i].error_count; j++) { 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,
1 << bit_pos; 1 << bit_pos;
} }
} else { } else {
pr_err("invalid bit-flip @ %d:%d\n", dev_err(&info->pdev->dev,
byte_pos, bit_pos); "invalid bit-flip @ %d:%d\n",
byte_pos, bit_pos);
err = -EBADMSG; err = -EBADMSG;
} }
} }
@ -1598,13 +1600,13 @@ static bool is_elm_present(struct omap_nand_info *info,
/* check whether elm-id is passed via DT */ /* check whether elm-id is passed via DT */
if (!elm_node) { if (!elm_node) {
pr_err("nand: error: ELM DT node not found\n"); dev_err(&info->pdev->dev, "ELM devicetree node not found\n");
return false; return false;
} }
pdev = of_find_device_by_node(elm_node); pdev = of_find_device_by_node(elm_node);
/* check whether ELM device is registered */ /* check whether ELM device is registered */
if (!pdev) { if (!pdev) {
pr_err("nand: error: ELM device not found\n"); dev_err(&info->pdev->dev, "ELM device not found\n");
return false; return false;
} }
/* ELM module available, now configure it */ /* ELM module available, now configure it */
@ -1734,14 +1736,14 @@ static int omap_nand_probe(struct platform_device *pdev)
/* scan NAND device connected to chip controller */ /* scan NAND device connected to chip controller */
nand_chip->options |= pdata->devsize & NAND_BUSWIDTH_16; nand_chip->options |= pdata->devsize & NAND_BUSWIDTH_16;
if (nand_scan_ident(mtd, 1, NULL)) { if (nand_scan_ident(mtd, 1, NULL)) {
pr_err("nand device scan failed, may be bus-width mismatch\n"); dev_err(&info->pdev->dev, "scan failed, may be bus-width mismatch\n");
err = -ENXIO; err = -ENXIO;
goto return_error; goto return_error;
} }
/* check for small page devices */ /* check for small page devices */
if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) { if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) {
pr_err("small page devices are not supported\n"); dev_err(&info->pdev->dev, "small page devices are not supported\n");
err = -EINVAL; err = -EINVAL;
goto return_error; goto return_error;
} }
@ -1896,8 +1898,9 @@ static int omap_nand_probe(struct platform_device *pdev)
nand_chip->ecc.bytes, nand_chip->ecc.bytes,
&ecclayout); &ecclayout);
if (!nand_chip->ecc.priv) { if (!nand_chip->ecc.priv) {
pr_err("nand: error: unable to use s/w BCH library\n"); dev_err(&info->pdev->dev, "unable to use BCH library\n");
err = -EINVAL; err = -EINVAL;
goto return_error;
} }
break; break;
@ -1959,7 +1962,7 @@ static int omap_nand_probe(struct platform_device *pdev)
nand_chip->ecc.bytes, nand_chip->ecc.bytes,
&ecclayout); &ecclayout);
if (!nand_chip->ecc.priv) { if (!nand_chip->ecc.priv) {
pr_err("nand: error: unable to use s/w BCH library\n"); dev_err(&info->pdev->dev, "unable to use BCH library\n");
err = -EINVAL; err = -EINVAL;
goto return_error; goto return_error;
} }
@ -2026,7 +2029,7 @@ static int omap_nand_probe(struct platform_device *pdev)
ecclayout->eccpos[ecclayout->eccbytes - 1] + 1; ecclayout->eccpos[ecclayout->eccbytes - 1] + 1;
break; break;
default: default:
pr_err("nand: error: invalid or unsupported ECC scheme\n"); dev_err(&info->pdev->dev, "invalid or unsupported ECC scheme\n");
err = -EINVAL; err = -EINVAL;
goto return_error; goto return_error;
} }
@ -2038,8 +2041,9 @@ static int omap_nand_probe(struct platform_device *pdev)
ecclayout->oobfree->length = mtd->oobsize - ecclayout->oobfree->offset; ecclayout->oobfree->length = mtd->oobsize - ecclayout->oobfree->offset;
/* check if NAND device's OOB is enough to store ECC signatures */ /* check if NAND device's OOB is enough to store ECC signatures */
if (mtd->oobsize < (ecclayout->eccbytes + BADBLOCK_MARKER_LENGTH)) { if (mtd->oobsize < (ecclayout->eccbytes + BADBLOCK_MARKER_LENGTH)) {
pr_err("not enough OOB bytes required = %d, available=%d\n", dev_err(&info->pdev->dev,
ecclayout->eccbytes, mtd->oobsize); "not enough OOB bytes required = %d, available=%d\n",
ecclayout->eccbytes, mtd->oobsize);
err = -EINVAL; err = -EINVAL;
goto return_error; goto return_error;
} }