diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-03 00:27:51 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-09 11:20:09 -0300 |
commit | 68429f50ab60074e58b98010103fcc5bac4afd54 (patch) | |
tree | 79238fd7fd84b0d20692ef653c735c0fe22dfc57 /drivers/staging | |
parent | dc3cdbc9d4dc22948d7f934789ee71baba55bc82 (diff) | |
download | linux-68429f50ab60074e58b98010103fcc5bac4afd54.tar.gz |
[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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/omap4iss/iss.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 6ceb4eb00493..ffc4900da961 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -362,6 +362,10 @@ static irqreturn_t iss_isr(int irq, void *_iss) return IRQ_HANDLED; } +static const struct media_device_ops iss_media_ops = { + .link_notify = v4l2_pipeline_link_notify, +}; + /* ----------------------------------------------------------------------------- * Pipeline stream management */ @@ -988,7 +992,7 @@ static int iss_register_entities(struct iss_device *iss) strlcpy(iss->media_dev.model, "TI OMAP4 ISS", sizeof(iss->media_dev.model)); iss->media_dev.hw_revision = iss->revision; - iss->media_dev.link_notify = v4l2_pipeline_link_notify; + iss->media_dev.ops = &iss_media_ops; ret = media_device_register(&iss->media_dev); if (ret < 0) { dev_err(iss->dev, "Media device registration failed (%d)\n", |