[media] media: Move media_device link_notify operation to an ops structure
This will allow adding new operations without increasing the media_device structure size for drivers that don't implement any media device operation. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
dc3cdbc9d4
commit
68429f50ab
@@ -657,6 +657,10 @@ static irqreturn_t isp_isr(int irq, void *_isp)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static const struct media_device_ops isp_media_ops = {
|
||||
.link_notify = v4l2_pipeline_link_notify,
|
||||
};
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Pipeline stream management
|
||||
*/
|
||||
@@ -1680,7 +1684,7 @@ static int isp_register_entities(struct isp_device *isp)
|
||||
strlcpy(isp->media_dev.model, "TI OMAP3 ISP",
|
||||
sizeof(isp->media_dev.model));
|
||||
isp->media_dev.hw_revision = isp->revision;
|
||||
isp->media_dev.link_notify = v4l2_pipeline_link_notify;
|
||||
isp->media_dev.ops = &isp_media_ops;
|
||||
media_device_init(&isp->media_dev);
|
||||
|
||||
isp->v4l2_dev.mdev = &isp->media_dev;
|
||||
|
Reference in New Issue
Block a user