Commit 8e511f42 authored by Andrew Halaney's avatar Andrew Halaney Committed by Sebastian Reichel

power: reset: nvmem-reboot-mode: quiet some device deferrals

Some errors are being logged that are really due to deferrals,
which is confusing to users. Use dev_err_probe() to handle when to log
at error level versus debug. This also has the added bonuses of logging
to devices_deferred and printing the error value.
Signed-off-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Reviewed-by: default avatarBrian Masney <bmasney@redhat.com>
Tested-by: default avatarBrian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20230817214218.638846-1-ahalaney@redhat.comSigned-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent a7d79bcc
......@@ -45,8 +45,8 @@ static int nvmem_reboot_mode_probe(struct platform_device *pdev)
nvmem_rbm->cell = devm_nvmem_cell_get(&pdev->dev, "reboot-mode");
if (IS_ERR(nvmem_rbm->cell)) {
dev_err(&pdev->dev, "failed to get the nvmem cell reboot-mode\n");
return PTR_ERR(nvmem_rbm->cell);
return dev_err_probe(&pdev->dev, PTR_ERR(nvmem_rbm->cell),
"failed to get the nvmem cell reboot-mode\n");
}
ret = devm_reboot_mode_register(&pdev->dev, &nvmem_rbm->reboot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment