summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_drv.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-08-14 16:53:45 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-19 11:17:06 (GMT)
commitf74be41221913b42adbca55890fd9a9282312b74 (patch)
tree2803eb1cd330fd643563d7c167502a97c242f1a4 /drivers/media/platform/vsp1/vsp1_drv.c
parenta96c5fa4502eec35972c9236636bd3f7af8bf69f (diff)
downloadlinux-f74be41221913b42adbca55890fd9a9282312b74.tar.xz
[media] v4l: vsp1: Make the BRU optional
Not all VSP instances have a BRU on R-Car Gen3, make it optional. Set the feature unconditionally for now, this will be fixed when adding Gen3 support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_drv.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_drv.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index 447f2bf..8d67a06 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -220,13 +220,15 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
}
/* Instantiate all the entities. */
- vsp1->bru = vsp1_bru_create(vsp1);
- if (IS_ERR(vsp1->bru)) {
- ret = PTR_ERR(vsp1->bru);
- goto done;
- }
+ if (vsp1->pdata.features & VSP1_HAS_BRU) {
+ vsp1->bru = vsp1_bru_create(vsp1);
+ if (IS_ERR(vsp1->bru)) {
+ ret = PTR_ERR(vsp1->bru);
+ goto done;
+ }
- list_add_tail(&vsp1->bru->entity.list_dev, &vsp1->entities);
+ list_add_tail(&vsp1->bru->entity.list_dev, &vsp1->entities);
+ }
vsp1->hsi = vsp1_hsit_create(vsp1, true);
if (IS_ERR(vsp1->hsi)) {
@@ -541,6 +543,7 @@ static int vsp1_parse_dt(struct vsp1_device *vsp1)
return -EINVAL;
}
+ pdata->features |= VSP1_HAS_BRU;
pdata->num_bru_inputs = 4;
return 0;