aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/saa5249.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/saa5249.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/saa5249.c')
-rw-r--r--drivers/media/video/saa5249.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c
index 225117c789c..c784715a0b0 100644
--- a/drivers/media/video/saa5249.c
+++ b/drivers/media/video/saa5249.c
@@ -186,7 +186,7 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind)
t->vdau[pgbuf].stopped = true;
t->is_searching[pgbuf] = false;
}
- vd->priv=t;
+ video_set_drvdata(vd, t);
/*
@@ -221,7 +221,7 @@ static int saa5249_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(vd);
kfree(client);
return 0;
@@ -320,7 +320,7 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
{
static int virtual_mode = false;
struct video_device *vd = video_devdata(file);
- struct saa5249_device *t=vd->priv;
+ struct saa5249_device *t = video_get_drvdata(vd);
switch(cmd)
{
@@ -619,7 +619,7 @@ static int saa5249_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
struct video_device *vd = video_devdata(file);
- struct saa5249_device *t=vd->priv;
+ struct saa5249_device *t = video_get_drvdata(vd);
int err;
cmd = vtx_fix_command(cmd);
@@ -632,7 +632,7 @@ static int saa5249_ioctl(struct inode *inode, struct file *file,
static int saa5249_open(struct inode *inode, struct file *file)
{
struct video_device *vd = video_devdata(file);
- struct saa5249_device *t = vd->priv;
+ struct saa5249_device *t = video_get_drvdata(vd);
int pgbuf;
if (t->client == NULL)
@@ -670,7 +670,7 @@ static int saa5249_open(struct inode *inode, struct file *file)
static int saa5249_release(struct inode *inode, struct file *file)
{
struct video_device *vd = video_devdata(file);
- struct saa5249_device *t = vd->priv;
+ struct saa5249_device *t = video_get_drvdata(vd);
i2c_senddata(t, 1, 0x20, -1); /* Turn off CCT */
i2c_senddata(t, 5, 3, 3, -1); /* Turn off TV-display */