Commit 84345a23 authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Mauro Carvalho Chehab

[media] media: coda: Fix probe() if reset controller is missing

Commit 39b4da71 ("reset: use ENOTSUPP instead of ENOSYS") changed
return value for reset controller if it missing.

This patch changes the CODA driver to handle this value.
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 811c6d6a
...@@ -2216,7 +2216,7 @@ static int coda_probe(struct platform_device *pdev) ...@@ -2216,7 +2216,7 @@ static int coda_probe(struct platform_device *pdev)
dev->rstc = devm_reset_control_get_optional(&pdev->dev, NULL); dev->rstc = devm_reset_control_get_optional(&pdev->dev, NULL);
if (IS_ERR(dev->rstc)) { if (IS_ERR(dev->rstc)) {
ret = PTR_ERR(dev->rstc); ret = PTR_ERR(dev->rstc);
if (ret == -ENOENT || ret == -ENOSYS) { if (ret == -ENOENT || ret == -ENOTSUPP) {
dev->rstc = NULL; dev->rstc = NULL;
} else { } else {
dev_err(&pdev->dev, "failed get reset control: %d\n", dev_err(&pdev->dev, "failed get reset control: %d\n",
......
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