diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-07-24 15:50:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-01 14:27:14 -0400 |
commit | ee27aa901805dfc9c3a5eb5f0948eba9ab481ba1 (patch) | |
tree | 917e69e5692605dd0735216569378c2f1f9c8c4c /drivers/media/platform | |
parent | 27dcb00d0dc1d532b0da940e35a6d020ee33bd47 (diff) |
[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 <shawn.guo@linaro.org>
Reported-by: Olof's autobuilder <build@lixom.net>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/coda.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
3780 | return ret; | 3780 | return ret; |
3781 | } | 3781 | } |
3782 | 3782 | ||
3783 | dev->rstc = devm_reset_control_get(&pdev->dev, NULL); | 3783 | dev->rstc = devm_reset_control_get_optional(&pdev->dev, NULL); |
3784 | if (IS_ERR(dev->rstc)) { | 3784 | if (IS_ERR(dev->rstc)) { |
3785 | ret = PTR_ERR(dev->rstc); | 3785 | ret = PTR_ERR(dev->rstc); |
3786 | if (ret == -ENOENT) { | 3786 | if (ret == -ENOENT || ret == -ENOSYS) { |
3787 | dev->rstc = NULL; | 3787 | dev->rstc = NULL; |
3788 | } else { | 3788 | } else { |
3789 | dev_err(&pdev->dev, "failed get reset control: %d\n", ret); | 3789 | dev_err(&pdev->dev, "failed get reset control: %d\n", ret); |