nand: brcmnand: Fix not calling dev_err() with a device
There are too many levels of indirection when calling dev_err. This is an artifact of the conversion of brcmnand_host.pdev from a struct platform_device (which has a member `dev` pointing to a struct device) to struct udevice. Signed-off-by: Sean Anderson <seanga2@gmail.com> Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
@@ -956,7 +956,7 @@ static struct nand_ecclayout *brcmnand_create_layout(int ecc_level,
|
|||||||
*/
|
*/
|
||||||
req = DIV_ROUND_UP(ecc_level * 14, 8);
|
req = DIV_ROUND_UP(ecc_level * 14, 8);
|
||||||
if (req >= sas) {
|
if (req >= sas) {
|
||||||
dev_err(&host->pdev->dev,
|
dev_err(host->pdev,
|
||||||
"error: ECC too large for OOB (ECC bytes %d, spare sector %d)\n",
|
"error: ECC too large for OOB (ECC bytes %d, spare sector %d)\n",
|
||||||
req, sas);
|
req, sas);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1012,8 +1012,8 @@ static struct nand_ecclayout *brcmstb_choose_ecc_layout(
|
|||||||
|
|
||||||
layout = brcmnand_create_layout(ecc_level, host);
|
layout = brcmnand_create_layout(ecc_level, host);
|
||||||
if (!layout) {
|
if (!layout) {
|
||||||
dev_err(&host->pdev->dev,
|
dev_err(host->pdev,
|
||||||
"no proper ecc_layout for this NAND cfg\n");
|
"no proper ecc_layout for this NAND cfg\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1056,17 +1056,9 @@ static void brcmnand_wp(struct mtd_info *mtd, int wp)
|
|||||||
NAND_CTRL_RDY |
|
NAND_CTRL_RDY |
|
||||||
NAND_STATUS_READY |
|
NAND_STATUS_READY |
|
||||||
(wp ? 0 : NAND_STATUS_WP), 0);
|
(wp ? 0 : NAND_STATUS_WP), 0);
|
||||||
#ifndef __UBOOT__
|
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err_ratelimited(&host->pdev->dev,
|
dev_err(host->pdev, "nand #WP expected %s\n",
|
||||||
"nand #WP expected %s\n",
|
wp ? "on" : "off");
|
||||||
wp ? "on" : "off");
|
|
||||||
#else
|
|
||||||
if (ret)
|
|
||||||
dev_err(&host->pdev->dev,
|
|
||||||
"nand #WP expected %s\n",
|
|
||||||
wp ? "on" : "off");
|
|
||||||
#endif /* __UBOOT__ */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2257,7 +2249,7 @@ static int brcmnand_init_cs(struct brcmnand_host *host, ofnode dn)
|
|||||||
ret = ofnode_read_s32(dn, "reg", &host->cs);
|
ret = ofnode_read_s32(dn, "reg", &host->cs);
|
||||||
#endif
|
#endif
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "can't get chip-select\n");
|
dev_err(pdev, "can't get chip-select\n");
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user