summaryrefslogtreecommitdiff
path: root/drivers/media/video/saa5246a.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-23 07:24:07 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 09:36:54 -0200
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)
memset(t->pgbuf[pgbuf], ' ', sizeof(t->pgbuf[0]));
t->is_searching[pgbuf] = false;
}
- vd->priv=t;
+ video_set_drvdata(vd, t);
/*
@@ -151,7 +151,7 @@ static int saa5246a_detach(struct i2c_client *client)
struct video_device *vd = i2c_get_clientdata(client);
i2c_detach_client(client);
video_unregister_device(vd);
- kfree(vd->priv);
+ kfree(video_get_drvdata(vd));
kfree(client);
return 0;
}
@@ -582,7 +582,8 @@ static int do_saa5246a_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *vd = video_devdata(file);
- struct saa5246a_device *t=vd->priv;
+ struct saa5246a_device *t = video_get_drvdata(vd);
+
switch(cmd)
{
case VTXIOCGETINFO:
@@ -723,7 +724,7 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
struct video_device *vd = video_devdata(file);
- struct saa5246a_device *t = vd->priv;
+ struct saa5246a_device *t = video_get_drvdata(vd);
int err;
cmd = vtx_fix_command(cmd);
@@ -736,7 +737,7 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file,
static int saa5246a_open(struct inode *inode, struct file *file)
{
struct video_device *vd = video_devdata(file);
- struct saa5246a_device *t = vd->priv;
+ struct saa5246a_device *t = video_get_drvdata(vd);
if (t->client == NULL)
return -ENODEV;
@@ -779,7 +780,7 @@ static int saa5246a_open(struct inode *inode, struct file *file)
static int saa5246a_release(struct inode *inode, struct file *file)
{
struct video_device *vd = video_devdata(file);
- struct saa5246a_device *t = vd->priv;
+ struct saa5246a_device *t = video_get_drvdata(vd);
/* Stop all acquisition circuits. */
i2c_senddata(t, SAA5246A_REGISTER_R1,