From: Philipp Zabel
Date: Thu, 24 Jul 2014 19:50:03 +0000 (-0300)
Subject: [media] coda: fix build error by making reset control optional
X-Git-Tag: v3.17-rc1~112^2~1
X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ee27aa901805dfc9c3a5eb5f0948eba9ab481ba1;p=karo-tx-linux.git
[media] coda: fix build error by making reset control optional
make reset control optional for i.MX27
The patch "[media] coda: add reset control support" introduced a build failure
if CONFIG_RESET_CONTROLLER is disabled:
drivers/media/platform/coda.c:3734:2: error: implicit declaration of
function 'devm_reset_control_get'
Since not all SoCs containing CODA VPUs do have a system reset controller,
use devm_reset_control_get_optional to make it optional.
Reported-by: Shawn Guo
Reported-by: Olof's autobuilder
Reported-by: kbuild test robot
Signed-off-by: Philipp Zabel
Signed-off-by: Mauro Carvalho Chehab
---
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index c44feee1c320..3a6d1d2b429e 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -3780,10 +3780,10 @@ static int coda_probe(struct platform_device *pdev)
return ret;
}
- dev->rstc = devm_reset_control_get(&pdev->dev, NULL);
+ dev->rstc = devm_reset_control_get_optional(&pdev->dev, NULL);
if (IS_ERR(dev->rstc)) {
ret = PTR_ERR(dev->rstc);
- if (ret == -ENOENT) {
+ if (ret == -ENOENT || ret == -ENOSYS) {
dev->rstc = NULL;
} else {
dev_err(&pdev->dev, "failed get reset control: %d\n", ret);