summaryrefslogtreecommitdiff
path: root/drivers/media/platform/fsl-viu.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2018-04-05 17:40:59 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-04-17 12:00:23 +0300
commit29d750686331a1a9ceeb97e81d3770f57bed5f72 (patch)
tree1860a4befa0fc06c953eb454d66c1fa2feaa3e83 /drivers/media/platform/fsl-viu.c
parentadfcf2e980c4b6186e115a8caf5f9d388ac39ec5 (diff)
downloadlinux-29d750686331a1a9ceeb97e81d3770f57bed5f72.tar.xz
media: fsl-viu: allow building it with COMPILE_TEST
There aren't many things that would be needed to allow it to build with compile test. Add the needed bits. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/fsl-viu.c')
-rw-r--r--drivers/media/platform/fsl-viu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index 9abe79779659..6fd1c8f66047 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -36,6 +36,12 @@
#define DRV_NAME "fsl_viu"
#define VIU_VERSION "0.5.1"
+/* Allow building this driver with COMPILE_TEST */
+#ifndef CONFIG_PPC
+#define out_be32(v, a) iowrite32be(a, (void __iomem *)v)
+#define in_be32(a) ioread32be((void __iomem *)a)
+#endif
+
#define BUFFER_TIMEOUT msecs_to_jiffies(500) /* 0.5 seconds */
#define VIU_VID_MEM_LIMIT 4 /* Video memory limit, in Mb */
@@ -1407,7 +1413,7 @@ static int viu_of_probe(struct platform_device *op)
}
viu_irq = irq_of_parse_and_map(op->dev.of_node, 0);
- if (viu_irq == NO_IRQ) {
+ if (!viu_irq) {
dev_err(&op->dev, "Error while mapping the irq\n");
return -EINVAL;
}