提交 ee27aa90 编写于 作者: P Philipp Zabel 提交者: Mauro Carvalho Chehab

[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: NShawn Guo <shawn.guo@linaro.org>
Reported-by: NOlof's autobuilder <build@lixom.net>
Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 27dcb00d
...@@ -3780,10 +3780,10 @@ static int coda_probe(struct platform_device *pdev) ...@@ -3780,10 +3780,10 @@ static int coda_probe(struct platform_device *pdev)
return ret; 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)) { if (IS_ERR(dev->rstc)) {
ret = PTR_ERR(dev->rstc); ret = PTR_ERR(dev->rstc);
if (ret == -ENOENT) { if (ret == -ENOENT || ret == -ENOSYS) {
dev->rstc = NULL; dev->rstc = NULL;
} else { } else {
dev_err(&pdev->dev, "failed get reset control: %d\n", ret); dev_err(&pdev->dev, "failed get reset control: %d\n", ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册