aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa5246a.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-23 06:24:07 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:54 -0400
commit601e9444f249d219009ec05674268d90f6f1cdcb (patch)
tree42d58813872e340e03a40b74922ea89dfdcf0c55 /drivers/media/video/saa5246a.c
parente138c592b50370621653fd962b2bc3f4e25dfe78 (diff)
V4L/DVB (8786): v4l2: remove the priv field, use dev_get_drvdata instead
Remove the priv field and let video_get/set_drvdata use dev_get_drvdata and dev_set_drvdata instead. Convert all drivers that still used priv directly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa5246a.c')
-rw-r--r--drivers/media/video/saa5246a.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c
index 5f5aa2063e0e..0178b49da0c1 100644
--- a/drivers/media/video/saa5246a.c
+++ b/drivers/media/video/saa5246a.c
@@ -117,7 +117,7 @@ static int saa5246a_attach(struct i2c_adapter *adap, int addr, int kind)
117 memset(t->pgbuf[pgbuf], ' ', sizeof(t->pgbuf[0])); 117 memset(t->pgbuf[pgbuf], ' ', sizeof(t->pgbuf[0]));
118 t->is_searching[pgbuf] = false; 118 t->is_searching[pgbuf] = false;
119 } 119 }
120 vd->priv=t; 120 video_set_drvdata(vd, t);
121 121
122 122
123 /* 123 /*
@@ -151,7 +151,7 @@ static int saa5246a_detach(struct i2c_client *client)
151 struct video_device *vd = i2c_get_clientdata(client); 151 struct video_device *vd = i2c_get_clientdata(client);
152 i2c_detach_client(client); 152 i2c_detach_client(client);
153 video_unregister_device(vd); 153 video_unregister_device(vd);
154 kfree(vd->priv); 154 kfree(video_get_drvdata(vd));
155 kfree(client); 155 kfree(client);
156 return 0; 156 return 0;
157} 157}
@@ -582,7 +582,8 @@ static int do_saa5246a_ioctl(struct inode *inode, struct file *file,
582 unsigned int cmd, void *arg) 582 unsigned int cmd, void *arg)
583{ 583{
584 struct video_device *vd = video_devdata(file); 584 struct video_device *vd = video_devdata(file);
585 struct saa5246a_device *t=vd->priv; 585 struct saa5246a_device *t = video_get_drvdata(vd);
586
586 switch(cmd) 587 switch(cmd)
587 { 588 {
588 case VTXIOCGETINFO: 589 case VTXIOCGETINFO:
@@ -723,7 +724,7 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file,
723 unsigned int cmd, unsigned long arg) 724 unsigned int cmd, unsigned long arg)
724{ 725{
725 struct video_device *vd = video_devdata(file); 726 struct video_device *vd = video_devdata(file);
726 struct saa5246a_device *t = vd->priv; 727 struct saa5246a_device *t = video_get_drvdata(vd);
727 int err; 728 int err;
728 729
729 cmd = vtx_fix_command(cmd); 730 cmd = vtx_fix_command(cmd);
@@ -736,7 +737,7 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file,
736static int saa5246a_open(struct inode *inode, struct file *file) 737static int saa5246a_open(struct inode *inode, struct file *file)
737{ 738{
738 struct video_device *vd = video_devdata(file); 739 struct video_device *vd = video_devdata(file);
739 struct saa5246a_device *t = vd->priv; 740 struct saa5246a_device *t = video_get_drvdata(vd);
740 741
741 if (t->client == NULL) 742 if (t->client == NULL)
742 return -ENODEV; 743 return -ENODEV;
@@ -779,7 +780,7 @@ static int saa5246a_open(struct inode *inode, struct file *file)
779static int saa5246a_release(struct inode *inode, struct file *file) 780static int saa5246a_release(struct inode *inode, struct file *file)
780{ 781{
781 struct video_device *vd = video_devdata(file); 782 struct video_device *vd = video_devdata(file);
782 struct saa5246a_device *t = vd->priv; 783 struct saa5246a_device *t = video_get_drvdata(vd);
783 784
784 /* Stop all acquisition circuits. */ 785 /* Stop all acquisition circuits. */
785 i2c_senddata(t, SAA5246A_REGISTER_R1, 786 i2c_senddata(t, SAA5246A_REGISTER_R1,