summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-09-06 09:33:39 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 12:19:00 -0200
commit0e576b76f5470a2f8b2287958a2b9a3dd0f56f10 (patch)
tree8c35b42290ca39072a406e44e20970174b7dfe80 /drivers/media/v4l2-core
parent77328043d9e6feb12e53a4fc5485cf664d2878e4 (diff)
downloadlinux-0e576b76f5470a2f8b2287958a2b9a3dd0f56f10.tar.bz2
[media] media-entity.h: rename entity.type to entity.function
Entities should have one or more functions. Calling it as a type proofed to not be correct, as an entity could eventually have more than one type. So, rename the field as function. Please notice that this patch doesn't extend support for multiple function entities. Such change will happen when we have real case drivers using it. No functional changes. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/tuner-core.c2
-rw-r--r--drivers/media/v4l2-core/v4l2-dev.c14
-rw-r--r--drivers/media/v4l2-core/v4l2-flash-led-class.c2
-rw-r--r--drivers/media/v4l2-core/v4l2-subdev.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c
index b90f2a52db96..e8fc5ec8fc35 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -698,7 +698,7 @@ register_client:
#if defined(CONFIG_MEDIA_CONTROLLER)
t->pad[TUNER_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK;
t->pad[TUNER_PAD_IF_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
- t->sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_TUNER;
+ t->sd.entity.function = MEDIA_ENT_T_V4L2_SUBDEV_TUNER;
t->sd.entity.name = t->name;
ret = media_entity_init(&t->sd.entity, TUNER_NUM_PADS, &t->pad[0]);
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index d36436582de9..965449958e97 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -197,7 +197,7 @@ static void v4l2_device_release(struct device *cd)
if (v4l2_dev->mdev) {
/* Remove interfaces and interface links */
media_devnode_remove(vdev->intf_devnode);
- if (vdev->entity.type != MEDIA_ENT_T_UNKNOWN)
+ if (vdev->entity.function != MEDIA_ENT_T_UNKNOWN)
media_device_unregister_entity(&vdev->entity);
}
#endif
@@ -735,20 +735,20 @@ static int video_register_media_controller(struct video_device *vdev, int type)
if (!vdev->v4l2_dev->mdev)
return 0;
- vdev->entity.type = MEDIA_ENT_T_UNKNOWN;
+ vdev->entity.function = MEDIA_ENT_T_UNKNOWN;
switch (type) {
case VFL_TYPE_GRABBER:
intf_type = MEDIA_INTF_T_V4L_VIDEO;
- vdev->entity.type = MEDIA_ENT_T_V4L2_VIDEO;
+ vdev->entity.function = MEDIA_ENT_T_V4L2_VIDEO;
break;
case VFL_TYPE_VBI:
intf_type = MEDIA_INTF_T_V4L_VBI;
- vdev->entity.type = MEDIA_ENT_T_V4L2_VBI;
+ vdev->entity.function = MEDIA_ENT_T_V4L2_VBI;
break;
case VFL_TYPE_SDR:
intf_type = MEDIA_INTF_T_V4L_SWRADIO;
- vdev->entity.type = MEDIA_ENT_T_V4L2_SWRADIO;
+ vdev->entity.function = MEDIA_ENT_T_V4L2_SWRADIO;
break;
case VFL_TYPE_RADIO:
intf_type = MEDIA_INTF_T_V4L_RADIO;
@@ -766,7 +766,7 @@ static int video_register_media_controller(struct video_device *vdev, int type)
return 0;
}
- if (vdev->entity.type != MEDIA_ENT_T_UNKNOWN) {
+ if (vdev->entity.function != MEDIA_ENT_T_UNKNOWN) {
vdev->entity.name = vdev->name;
/* Needed just for backward compatibility with legacy MC API */
@@ -793,7 +793,7 @@ static int video_register_media_controller(struct video_device *vdev, int type)
return -ENOMEM;
}
- if (vdev->entity.type != MEDIA_ENT_T_UNKNOWN) {
+ if (vdev->entity.function != MEDIA_ENT_T_UNKNOWN) {
struct media_link *link;
link = media_create_intf_link(&vdev->entity,
diff --git a/drivers/media/v4l2-core/v4l2-flash-led-class.c b/drivers/media/v4l2-core/v4l2-flash-led-class.c
index 34c489fed55e..cf7b3cb9a373 100644
--- a/drivers/media/v4l2-core/v4l2-flash-led-class.c
+++ b/drivers/media/v4l2-core/v4l2-flash-led-class.c
@@ -655,7 +655,7 @@ struct v4l2_flash *v4l2_flash_init(
if (ret < 0)
return ERR_PTR(ret);
- sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH;
+ sd->entity.function = MEDIA_ENT_T_V4L2_SUBDEV_FLASH;
ret = v4l2_flash_init_controls(v4l2_flash, config);
if (ret < 0)
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index b3bcc8253182..b440cb66669c 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -535,9 +535,9 @@ v4l2_subdev_link_validate_get_format(struct media_pad *pad,
return v4l2_subdev_call(sd, pad, get_fmt, NULL, fmt);
}
- WARN(pad->entity->type != MEDIA_ENT_T_V4L2_VIDEO,
+ WARN(pad->entity->function != MEDIA_ENT_T_V4L2_VIDEO,
"Driver bug! Wrong media entity type 0x%08x, entity %s\n",
- pad->entity->type, pad->entity->name);
+ pad->entity->function, pad->entity->name);
return -EINVAL;
}
@@ -584,7 +584,7 @@ void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops)
sd->host_priv = NULL;
#if defined(CONFIG_MEDIA_CONTROLLER)
sd->entity.name = sd->name;
- sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN;
+ sd->entity.function = MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN;
#endif
}
EXPORT_SYMBOL(v4l2_subdev_init);