提交 153d41a1 编写于 作者: M Mauro Carvalho Chehab

[media] v4l2-mc: remove the unused sensor var

This fixes this warning:

	v4l2-mc.c: In function 'v4l2_mc_create_media_graph':
	v4l2-mc.c:60:69: warning: variable 'sensor' set but not used [-Wunused-but-set-variable]

We could solve it the other way: don't do the second loop for
webcams. However, that would fail if a chip would have two sensors
plugged. This is not the current case, but it doesn't hurt to be
future-safe here, specially since this code runs only once during
device probe. So, performance is not an issue here.
Reported-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 6168309a
...@@ -96,7 +96,7 @@ int v4l2_mc_create_media_graph(struct media_device *mdev) ...@@ -96,7 +96,7 @@ int v4l2_mc_create_media_graph(struct media_device *mdev)
{ {
struct media_entity *entity; struct media_entity *entity;
struct media_entity *if_vid = NULL, *if_aud = NULL, *sensor = NULL; struct media_entity *if_vid = NULL, *if_aud = NULL;
struct media_entity *tuner = NULL, *decoder = NULL; struct media_entity *tuner = NULL, *decoder = NULL;
struct media_entity *io_v4l = NULL, *io_vbi = NULL, *io_swradio = NULL; struct media_entity *io_v4l = NULL, *io_vbi = NULL, *io_swradio = NULL;
bool is_webcam = false; bool is_webcam = false;
...@@ -130,7 +130,6 @@ int v4l2_mc_create_media_graph(struct media_device *mdev) ...@@ -130,7 +130,6 @@ int v4l2_mc_create_media_graph(struct media_device *mdev)
io_swradio = entity; io_swradio = entity;
break; break;
case MEDIA_ENT_F_CAM_SENSOR: case MEDIA_ENT_F_CAM_SENSOR:
sensor = entity;
is_webcam = true; is_webcam = true;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册