Skip to contentSkip to conversation

ipu3-cio2: Set CSI-2 receiver sub-device entity function

PATCH In review Sakari Ailus 2 participants 2 messages Mar 18, 2019 – Mar 19, 2019

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 ipu3-cio2: Set CSI-2 receiver sub-device entity function

Set the entity function for the four CSI-2 receiver sub-devices the driver creates. This avoids a kernel warning from each as well.

---
 drivers/media/pci/intel/ipu3/ipu3-cio2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -0
index 617fb2e944dc3..b76dff851f3d2 100644
@@ -1601,6 +1601,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
 	subdev->owner = THIS_MODULE;
 	snprintf(subdev->name, sizeof(subdev->name),
 		 CIO2_ENTITY_NAME " %td", q - cio2->queue);
+	subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
 	v4l2_set_subdevdata(subdev, cio2);
 	r = v4l2_device_register_subdev(&cio2->v4l2_dev, subdev);
 	if (r) {
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Sakari Ailus

Set the entity function for the four CSI-2 receiver sub-devices the driver creates. This avoids a kernel warning from each as well.

---
 drivers/media/pci/intel/ipu3/ipu3-cio2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -0
index 617fb2e944dc3..b76dff851f3d2 100644
@@ -1601,6 +1601,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
 	subdev->owner = THIS_MODULE;
 	snprintf(subdev->name, sizeof(subdev->name),
 		 CIO2_ENTITY_NAME " %td", q - cio2->queue);
+	subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
 	v4l2_set_subdevdata(subdev, cio2);
 	r = v4l2_device_register_subdev(&cio2->v4l2_dev, subdev);
 	if (r) {