[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>
Cette révision appartient à :

révisé par
Mauro Carvalho Chehab

Parent
dc3cdbc9d4
révision
68429f50ab
@@ -1190,6 +1190,10 @@ static int fimc_md_link_notify(struct media_link *link, unsigned int flags,
|
||||
return ret ? -EPIPE : 0;
|
||||
}
|
||||
|
||||
static const struct media_device_ops fimc_md_ops = {
|
||||
.link_notify = fimc_md_link_notify,
|
||||
};
|
||||
|
||||
static ssize_t fimc_md_sysfs_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
@@ -1416,7 +1420,7 @@ static int fimc_md_probe(struct platform_device *pdev)
|
||||
|
||||
strlcpy(fmd->media_dev.model, "SAMSUNG S5P FIMC",
|
||||
sizeof(fmd->media_dev.model));
|
||||
fmd->media_dev.link_notify = fimc_md_link_notify;
|
||||
fmd->media_dev.ops = &fimc_md_ops;
|
||||
fmd->media_dev.dev = dev;
|
||||
|
||||
v4l2_dev = &fmd->v4l2_dev;
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur