Skip to content

Commit

Permalink
[media] media: coda: Fix probe() if reset controller is missing
Browse files Browse the repository at this point in the history
Commit 39b4da7 ("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: Alexander Shiyan <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
shcgit authored and mchehab committed Jul 8, 2016
1 parent 811c6d6 commit 84345a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/coda/coda-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,7 @@ static int coda_probe(struct platform_device *pdev)
dev->rstc = devm_reset_control_get_optional(&pdev->dev, NULL);
if (IS_ERR(dev->rstc)) {
ret = PTR_ERR(dev->rstc);
if (ret == -ENOENT || ret == -ENOSYS) {
if (ret == -ENOENT || ret == -ENOTSUPP) {
dev->rstc = NULL;
} else {
dev_err(&pdev->dev, "failed get reset control: %d\n",
Expand Down

0 comments on commit 84345a2

Please sign in to comment.