diff mbox

[4/12] TW686x: Fix s_std() / g_std() / g_parm() pointer to self

Message ID m3h9hydqm3.fsf@t19.piap.pl (mailing list archive)
State New, archived
Headers show

Commit Message

Krzysztof HaƂasa Jan. 28, 2016, 9:01 a.m. UTC
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c
index 5a1b9ab..78f4f55 100644
--- a/drivers/media/pci/tw686x/tw686x-video.c
+++ b/drivers/media/pci/tw686x/tw686x-video.c
@@ -416,7 +416,7 @@  static int tw686x_querycap(struct file *file, void *priv,
 
 static int tw686x_s_std(struct file *file, void *priv, v4l2_std_id id)
 {
-	struct tw686x_video_channel *vc = priv;
+	struct tw686x_video_channel *vc = video_drvdata(file);
 	unsigned std, count = 0;
 	u32 sdt, std_mask = 0;
 
@@ -437,7 +437,7 @@  static int tw686x_s_std(struct file *file, void *priv, v4l2_std_id id)
 
 static int tw686x_g_std(struct file *file, void *priv, v4l2_std_id *id)
 {
-	struct tw686x_video_channel *vc = priv;
+	struct tw686x_video_channel *vc = video_drvdata(file);
 
 	*id = vc->video_standard;
 	return 0;
@@ -457,7 +457,7 @@  static int tw686x_enum_fmt_vid_cap(struct file *file, void *priv,
 static int tw686x_g_parm(struct file *file, void *priv,
 			 struct v4l2_streamparm *sp)
 {
-	struct tw686x_video_channel *vc = priv;
+	struct tw686x_video_channel *vc = video_drvdata(file);
 
 	if (sp->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
 		return -EINVAL;