]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
V4L/DVB (8788): v4l: replace video_get_drvdata(video_devdata(filp)) with video_drvdat...
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 23 Aug 2008 11:32:09 +0000 (08:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:54 +0000 (09:36 -0200)
Use the new video_drvdata(filp) function where it is safe to do so.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
26 files changed:
drivers/media/radio/dsbr100.c
drivers/media/radio/radio-aimslab.c
drivers/media/radio/radio-aztech.c
drivers/media/radio/radio-gemtek-pci.c
drivers/media/radio/radio-gemtek.c
drivers/media/radio/radio-maestro.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-rtrack2.c
drivers/media/radio/radio-sf16fmi.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-si470x.c
drivers/media/radio/radio-terratec.c
drivers/media/radio/radio-typhoon.c
drivers/media/radio/radio-zoltrix.c
drivers/media/video/cpia2/cpia2_v4l.c
drivers/media/video/et61x251/et61x251_core.c
drivers/media/video/saa5246a.c
drivers/media/video/saa5249.c
drivers/media/video/sn9c102/sn9c102_core.c
drivers/media/video/usbvideo/vicam.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/uvc/uvc_v4l2.c
drivers/media/video/vino.c
drivers/media/video/w9966.c
drivers/media/video/zc0301/zc0301_core.c
sound/i2c/other/tea575x-tuner.c

index 3a4eb444a7c3630628cad9a12ce2ab2eaf9e4464..0f06e6ffb0e903389faac18d9cc52aa46cf8bf15 100644 (file)
@@ -274,7 +274,7 @@ static int vidioc_querycap(struct file *file, void *priv,
 static int vidioc_g_tuner(struct file *file, void *priv,
                                struct v4l2_tuner *v)
 {
-       struct dsbr100_device *radio = video_get_drvdata(video_devdata(file));
+       struct dsbr100_device *radio = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -306,7 +306,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                struct v4l2_frequency *f)
 {
-       struct dsbr100_device *radio = video_get_drvdata(video_devdata(file));
+       struct dsbr100_device *radio = video_drvdata(file);
 
        radio->curfreq = f->frequency;
        if (dsbr100_setfreq(radio, radio->curfreq)==-1)
@@ -317,7 +317,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                struct v4l2_frequency *f)
 {
-       struct dsbr100_device *radio = video_get_drvdata(video_devdata(file));
+       struct dsbr100_device *radio = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = radio->curfreq;
@@ -342,7 +342,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct dsbr100_device *radio = video_get_drvdata(video_devdata(file));
+       struct dsbr100_device *radio = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -355,7 +355,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct dsbr100_device *radio = video_get_drvdata(video_devdata(file));
+       struct dsbr100_device *radio = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -405,7 +405,7 @@ static int vidioc_s_audio(struct file *file, void *priv,
 
 static int usb_dsbr100_open(struct inode *inode, struct file *file)
 {
-       struct dsbr100_device *radio=video_get_drvdata(video_devdata(file));
+       struct dsbr100_device *radio = video_drvdata(file);
 
        lock_kernel();
        radio->users = 1;
@@ -424,7 +424,7 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
 
 static int usb_dsbr100_close(struct inode *inode, struct file *file)
 {
-       struct dsbr100_device *radio=video_get_drvdata(video_devdata(file));
+       struct dsbr100_device *radio = video_drvdata(file);
 
        if (!radio)
                return -ENODEV;
index 62cc6874d63feecc68de7e2a30486db7bf549d1d..9305e958fc665399e5dd7454d9b56f5939d76709 100644 (file)
@@ -246,8 +246,7 @@ static int vidioc_querycap(struct file *file, void  *priv,
 static int vidioc_g_tuner(struct file *file, void *priv,
                                        struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -274,8 +273,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        rt->curfreq = f->frequency;
        rt_setfreq(rt, rt->curfreq);
@@ -285,8 +283,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = rt->curfreq;
@@ -311,8 +308,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -328,8 +324,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 5dd5e349ef47c22696b0fea79c72c5de5880d9ce..d78489573230c259086711245d35775af57ed94a 100644 (file)
@@ -196,8 +196,7 @@ static int vidioc_querycap (struct file *file, void  *priv,
 static int vidioc_g_tuner (struct file *file, void *priv,
                                struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct az_device *az = video_get_drvdata(dev);
+       struct az_device *az = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -265,8 +264,7 @@ static int vidioc_s_audio (struct file *file, void *priv,
 static int vidioc_s_frequency (struct file *file, void *priv,
                                struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct az_device *az = video_get_drvdata(dev);
+       struct az_device *az = video_drvdata(file);
 
        az->curfreq = f->frequency;
        az_setfreq(az, az->curfreq);
@@ -276,8 +274,7 @@ static int vidioc_s_frequency (struct file *file, void *priv,
 static int vidioc_g_frequency (struct file *file, void *priv,
                                struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct az_device *az = video_get_drvdata(dev);
+       struct az_device *az = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = az->curfreq;
@@ -303,8 +300,7 @@ static int vidioc_queryctrl (struct file *file, void *priv,
 static int vidioc_g_ctrl (struct file *file, void *priv,
                            struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct az_device *az = video_get_drvdata(dev);
+       struct az_device *az = video_drvdata(file);
 
        switch (ctrl->id) {
                case V4L2_CID_AUDIO_MUTE:
@@ -323,8 +319,7 @@ static int vidioc_g_ctrl (struct file *file, void *priv,
 static int vidioc_s_ctrl (struct file *file, void *priv,
                            struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct az_device *az = video_get_drvdata(dev);
+       struct az_device *az = video_drvdata(file);
 
        switch (ctrl->id) {
                case V4L2_CID_AUDIO_MUTE:
index 1f57f731c12179552299ec6d0d39e258232dedcf..e15bee6d7cfcb874fedab31a35730af81a75b19b 100644 (file)
@@ -204,8 +204,7 @@ static int vidioc_querycap(struct file *file, void *priv,
 static int vidioc_g_tuner(struct file *file, void *priv,
                                        struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_pci_card *card = video_get_drvdata(dev);
+       struct gemtek_pci_card *card = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -232,8 +231,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_pci_card *card = video_get_drvdata(dev);
+       struct gemtek_pci_card *card = video_drvdata(file);
 
        if ( (f->frequency < GEMTEK_PCI_RANGE_LOW) ||
                        (f->frequency > GEMTEK_PCI_RANGE_HIGH) )
@@ -247,8 +245,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_pci_card *card = video_get_drvdata(dev);
+       struct gemtek_pci_card *card = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = card->current_frequency;
@@ -272,8 +269,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_pci_card *card = video_get_drvdata(dev);
+       struct gemtek_pci_card *card = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -292,8 +288,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_pci_card *card = video_get_drvdata(dev);
+       struct gemtek_pci_card *card = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 2c4c15e6d510fdd3e3f81299c7843d29a35d8944..d131a5d381287b0069d4e83dad2615feb115adf7 100644 (file)
@@ -459,8 +459,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *v)
 static int vidioc_s_frequency(struct file *file, void *priv,
                              struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_device *rt = video_get_drvdata(dev);
+       struct gemtek_device *rt = video_drvdata(file);
 
        gemtek_setfreq(rt, f->frequency);
 
@@ -470,8 +469,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                              struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_device *rt = video_get_drvdata(dev);
+       struct gemtek_device *rt = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = rt->lastfreq;
@@ -495,8 +493,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                         struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_device *rt = video_get_drvdata(dev);
+       struct gemtek_device *rt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -515,8 +512,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                         struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct gemtek_device *rt = video_get_drvdata(dev);
+       struct gemtek_device *rt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 182b433981ca69d97e65533279181785a01b38a7..4bf4d007bcfa2b62db846c29f3c035831c5f0433 100644 (file)
@@ -210,8 +210,7 @@ static int vidioc_querycap(struct file *file, void  *priv,
 static int vidioc_g_tuner(struct file *file, void *priv,
                                        struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -243,8 +242,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        if (f->frequency < FREQ_LO || f->frequency > FREQ_HI)
                return -EINVAL;
@@ -255,8 +253,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = BITS2FREQ(radio_bits_get(card));
@@ -281,8 +278,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -295,8 +291,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
        register u16 io = card->io;
        register u16 omask = inw(io + IO_MASK);
 
index 9bf2acf5249ce40624a080f2141763532af1be1c..c777a17b00bc21c986b08b756080a995eeeb990e 100644 (file)
@@ -231,8 +231,7 @@ static int vidioc_querycap (struct file *file, void  *priv,
 static int vidioc_g_tuner (struct file *file, void *priv,
                           struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -302,8 +301,7 @@ static int vidioc_s_audio (struct file *file, void *priv,
 static int vidioc_s_frequency (struct file *file, void *priv,
                               struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        if (f->frequency < FREQ_LO || f->frequency > FREQ_HI) {
                dprintk(1, "radio freq (%d.%02d MHz) out of range (%d-%d)\n",
@@ -324,8 +322,7 @@ static int vidioc_s_frequency (struct file *file, void *priv,
 static int vidioc_g_frequency (struct file *file, void *priv,
                               struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = card->freq;
@@ -355,8 +352,7 @@ static int vidioc_queryctrl (struct file *file, void *priv,
 static int vidioc_g_ctrl (struct file *file, void *priv,
                            struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        switch (ctrl->id) {
                case V4L2_CID_AUDIO_MUTE:
@@ -370,8 +366,7 @@ static int vidioc_g_ctrl (struct file *file, void *priv,
 static int vidioc_s_ctrl (struct file *file, void *priv,
                          struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct radio_device *card = video_get_drvdata(dev);
+       struct radio_device *card = video_drvdata(file);
 
        switch (ctrl->id) {
                case V4L2_CID_AUDIO_MUTE:
index 4234f7ed0fc36920cdc16b0476a3aaf06aa0358c..a67079777419571e875100f6d488e9c0178d939c 100644 (file)
@@ -154,8 +154,7 @@ static int rt_getsigstr(struct rt_device *dev)
 static int vidioc_g_tuner(struct file *file, void *priv,
                                struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -174,8 +173,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        rt->curfreq = f->frequency;
        rt_setfreq(rt, rt->curfreq);
@@ -185,8 +183,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = rt->curfreq;
@@ -211,8 +208,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -231,8 +227,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct rt_device *rt = video_get_drvdata(dev);
+       struct rt_device *rt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 810c366b73b0929c2abb973e0c40b0bd9c5e7126..329c90bddadd953836b25cd10dd9668bf2e99329 100644 (file)
@@ -147,8 +147,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
                                        struct v4l2_tuner *v)
 {
        int mult;
-       struct video_device *dev = video_devdata(file);
-       struct fmi_device *fmi = video_get_drvdata(dev);
+       struct fmi_device *fmi = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -176,8 +175,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmi_device *fmi = video_get_drvdata(dev);
+       struct fmi_device *fmi = video_drvdata(file);
 
        if (!(fmi->flags & V4L2_TUNER_CAP_LOW))
                f->frequency *= 1000;
@@ -194,8 +192,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmi_device *fmi = video_get_drvdata(dev);
+       struct fmi_device *fmi = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = fmi->curfreq;
@@ -222,8 +219,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmi_device *fmi = video_get_drvdata(dev);
+       struct fmi_device *fmi = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -236,8 +232,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmi_device *fmi = video_get_drvdata(dev);
+       struct fmi_device *fmi = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 9f823150452de1b87751d5825b2f80536bea0a6a..b1f47c322e02637e58b2117a3c7df2e51656dd76 100644 (file)
@@ -230,8 +230,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
                                        struct v4l2_tuner *v)
 {
        int mult;
-       struct video_device *dev = video_devdata(file);
-       struct fmr2_device *fmr2 = video_get_drvdata(dev);
+       struct fmr2_device *fmr2 = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -263,8 +262,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmr2_device *fmr2 = video_get_drvdata(dev);
+       struct fmr2_device *fmr2 = video_drvdata(file);
 
        if (!(fmr2->flags & V4L2_TUNER_CAP_LOW))
                f->frequency *= 1000;
@@ -287,8 +285,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmr2_device *fmr2 = video_get_drvdata(dev);
+       struct fmr2_device *fmr2 = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = fmr2->curfreq;
@@ -314,8 +311,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmr2_device *fmr2 = video_get_drvdata(dev);
+       struct fmr2_device *fmr2 = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -331,8 +327,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct fmr2_device *fmr2 = video_get_drvdata(dev);
+       struct fmr2_device *fmr2 = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 337d55793836fa981a76105eb526a5d6a21f6ad6..f6cedcd3ab97b82b532b16a03137eb0fd5c7e75f 100644 (file)
@@ -986,7 +986,7 @@ static void si470x_work(struct work_struct *work)
 static ssize_t si470x_fops_read(struct file *file, char __user *buf,
                size_t count, loff_t *ppos)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
        unsigned int block_count = 0;
 
@@ -1047,7 +1047,7 @@ done:
 static unsigned int si470x_fops_poll(struct file *file,
                struct poll_table_struct *pts)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* switch on rds reception */
@@ -1071,7 +1071,7 @@ static unsigned int si470x_fops_poll(struct file *file,
  */
 static int si470x_fops_open(struct inode *inode, struct file *file)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval;
 
        lock_kernel();
@@ -1101,7 +1101,7 @@ done:
  */
 static int si470x_fops_release(struct inode *inode, struct file *file)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety check */
@@ -1284,7 +1284,7 @@ done:
 static int si470x_vidioc_g_ctrl(struct file *file, void *priv,
                struct v4l2_control *ctrl)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety checks */
@@ -1320,7 +1320,7 @@ done:
 static int si470x_vidioc_s_ctrl(struct file *file, void *priv,
                struct v4l2_control *ctrl)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety checks */
@@ -1407,7 +1407,7 @@ done:
 static int si470x_vidioc_g_tuner(struct file *file, void *priv,
                struct v4l2_tuner *tuner)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety checks */
@@ -1473,7 +1473,7 @@ done:
 static int si470x_vidioc_s_tuner(struct file *file, void *priv,
                struct v4l2_tuner *tuner)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety checks */
@@ -1507,7 +1507,7 @@ done:
 static int si470x_vidioc_g_frequency(struct file *file, void *priv,
                struct v4l2_frequency *freq)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety checks */
@@ -1536,7 +1536,7 @@ done:
 static int si470x_vidioc_s_frequency(struct file *file, void *priv,
                struct v4l2_frequency *freq)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety checks */
@@ -1565,7 +1565,7 @@ done:
 static int si470x_vidioc_s_hw_freq_seek(struct file *file, void *priv,
                struct v4l2_hw_freq_seek *seek)
 {
-       struct si470x_device *radio = video_get_drvdata(video_devdata(file));
+       struct si470x_device *radio = video_drvdata(file);
        int retval = 0;
 
        /* safety checks */
index 0bc9af686ad73e708f5d5f56e917c373f6700362..0abb186a9473e5661dd1a117e83acdc9fe034a98 100644 (file)
@@ -221,8 +221,7 @@ static int vidioc_querycap(struct file *file, void *priv,
 static int vidioc_g_tuner(struct file *file, void *priv,
                                        struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct tt_device *tt = video_get_drvdata(dev);
+       struct tt_device *tt = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -249,8 +248,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct tt_device *tt = video_get_drvdata(dev);
+       struct tt_device *tt = video_drvdata(file);
 
        tt->curfreq = f->frequency;
        tt_setfreq(tt, tt->curfreq);
@@ -260,8 +258,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct tt_device *tt = video_get_drvdata(dev);
+       struct tt_device *tt = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = tt->curfreq;
@@ -286,8 +283,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct tt_device *tt = video_get_drvdata(dev);
+       struct tt_device *tt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -306,8 +302,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct tt_device *tt = video_get_drvdata(dev);
+       struct tt_device *tt = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 27255d7ff1ba076275ee2efe9fff8da74c08da58..952ec35a8415129100ae56564ee2e956facbccd7 100644 (file)
@@ -223,8 +223,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct typhoon_device *typhoon = video_get_drvdata(dev);
+       struct typhoon_device *typhoon = video_drvdata(file);
 
        typhoon->curfreq = f->frequency;
        typhoon_setfreq(typhoon, typhoon->curfreq);
@@ -234,8 +233,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct typhoon_device *typhoon = video_get_drvdata(dev);
+       struct typhoon_device *typhoon = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = typhoon->curfreq;
@@ -261,8 +259,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct typhoon_device *typhoon = video_get_drvdata(dev);
+       struct typhoon_device *typhoon = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -278,8 +275,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl (struct file *file, void *priv,
                                        struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct typhoon_device *typhoon = video_get_drvdata(dev);
+       struct typhoon_device *typhoon = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index 3a9a7772ae510f48a484e0cbfa20d28459783387..f75da63b16345f7957af152a93f7c690d1f77da7 100644 (file)
@@ -246,8 +246,7 @@ static int vidioc_querycap(struct file *file, void  *priv,
 static int vidioc_g_tuner(struct file *file, void *priv,
                                        struct v4l2_tuner *v)
 {
-       struct video_device *dev = video_devdata(file);
-       struct zol_device *zol = video_get_drvdata(dev);
+       struct zol_device *zol = video_drvdata(file);
 
        if (v->index > 0)
                return -EINVAL;
@@ -277,8 +276,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
 static int vidioc_s_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct zol_device *zol = video_get_drvdata(dev);
+       struct zol_device *zol = video_drvdata(file);
 
        zol->curfreq = f->frequency;
        zol_setfreq(zol, zol->curfreq);
@@ -288,8 +286,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 static int vidioc_g_frequency(struct file *file, void *priv,
                                        struct v4l2_frequency *f)
 {
-       struct video_device *dev = video_devdata(file);
-       struct zol_device *zol = video_get_drvdata(dev);
+       struct zol_device *zol = video_drvdata(file);
 
        f->type = V4L2_TUNER_RADIO;
        f->frequency = zol->curfreq;
@@ -314,8 +311,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
 static int vidioc_g_ctrl(struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct zol_device *zol = video_get_drvdata(dev);
+       struct zol_device *zol = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -331,8 +327,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
 static int vidioc_s_ctrl(struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct zol_device *zol = video_get_drvdata(dev);
+       struct zol_device *zol = video_drvdata(file);
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
index eb9f15cd4c45c9884170fb9599e99f6544e4e288..897e8d1a5c3c0a08cadc5dfa470767c90095573d 100644 (file)
@@ -241,8 +241,7 @@ static struct v4l2_queryctrl controls[] = {
  *****************************************************************************/
 static int cpia2_open(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct camera_data *cam = video_get_drvdata(dev);
+       struct camera_data *cam = video_drvdata(file);
        int retval = 0;
 
        if (!cam) {
@@ -357,8 +356,7 @@ static int cpia2_close(struct inode *inode, struct file *file)
 static ssize_t cpia2_v4l_read(struct file *file, char __user *buf, size_t count,
                              loff_t *off)
 {
-       struct video_device *dev = video_devdata(file);
-       struct camera_data *cam = video_get_drvdata(dev);
+       struct camera_data *cam = video_drvdata(file);
        int noblock = file->f_flags&O_NONBLOCK;
 
        struct cpia2_fh *fh = file->private_data;
@@ -382,9 +380,7 @@ static ssize_t cpia2_v4l_read(struct file *file, char __user *buf, size_t count,
  *****************************************************************************/
 static unsigned int cpia2_v4l_poll(struct file *filp, struct poll_table_struct *wait)
 {
-       struct video_device *dev = video_devdata(filp);
-       struct camera_data *cam = video_get_drvdata(dev);
-
+       struct camera_data *cam = video_drvdata(filp);
        struct cpia2_fh *fh = filp->private_data;
 
        if(!cam)
@@ -1579,8 +1575,7 @@ static int ioctl_dqbuf(void *arg,struct camera_data *cam, struct file *file)
 static int cpia2_do_ioctl(struct inode *inode, struct file *file,
                          unsigned int ioctl_nr, void *arg)
 {
-       struct video_device *dev = video_devdata(file);
-       struct camera_data *cam = video_get_drvdata(dev);
+       struct camera_data *cam = video_drvdata(file);
        int retval = 0;
 
        if (!cam)
@@ -1860,9 +1855,8 @@ static int cpia2_ioctl(struct inode *inode, struct file *file,
  *****************************************************************************/
 static int cpia2_mmap(struct file *file, struct vm_area_struct *area)
 {
+       struct camera_data *cam = video_drvdata(file);
        int retval;
-       struct video_device *dev = video_devdata(file);
-       struct camera_data *cam = video_get_drvdata(dev);
 
        /* Priority check */
        struct cpia2_fh *fh = file->private_data;
index 8db2a05bf9c542544b3a3bf9bc1c4fdd5cc217bf..7a85c41b0eea3b592ccc7554707421a40d70aaa3 100644 (file)
@@ -1214,7 +1214,7 @@ static int et61x251_open(struct inode* inode, struct file* filp)
        if (!down_read_trylock(&et61x251_dev_lock))
                return -ERESTARTSYS;
 
-       cam = video_get_drvdata(video_devdata(filp));
+       cam = video_drvdata(filp);
 
        if (wait_for_completion_interruptible(&cam->probe)) {
                up_read(&et61x251_dev_lock);
@@ -1297,7 +1297,7 @@ static int et61x251_release(struct inode* inode, struct file* filp)
 
        down_write(&et61x251_dev_lock);
 
-       cam = video_get_drvdata(video_devdata(filp));
+       cam = video_drvdata(filp);
 
        et61x251_stop_transfer(cam);
        et61x251_release_buffers(cam);
@@ -1318,7 +1318,7 @@ static ssize_t
 et61x251_read(struct file* filp, char __user * buf,
              size_t count, loff_t* f_pos)
 {
-       struct et61x251_device* cam = video_get_drvdata(video_devdata(filp));
+       struct et61x251_device *cam = video_drvdata(filp);
        struct et61x251_frame_t* f, * i;
        unsigned long lock_flags;
        long timeout;
@@ -1426,7 +1426,7 @@ exit:
 
 static unsigned int et61x251_poll(struct file *filp, poll_table *wait)
 {
-       struct et61x251_device* cam = video_get_drvdata(video_devdata(filp));
+       struct et61x251_device *cam = video_drvdata(filp);
        struct et61x251_frame_t* f;
        unsigned long lock_flags;
        unsigned int mask = 0;
@@ -1502,7 +1502,7 @@ static struct vm_operations_struct et61x251_vm_ops = {
 
 static int et61x251_mmap(struct file* filp, struct vm_area_struct *vma)
 {
-       struct et61x251_device* cam = video_get_drvdata(video_devdata(filp));
+       struct et61x251_device *cam = video_drvdata(filp);
        unsigned long size = vma->vm_end - vma->vm_start,
                      start = vma->vm_start;
        void *pos;
@@ -2395,7 +2395,7 @@ et61x251_vidioc_s_parm(struct et61x251_device* cam, void __user * arg)
 static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp,
                               unsigned int cmd, void __user * arg)
 {
-       struct et61x251_device* cam = video_get_drvdata(video_devdata(filp));
+       struct et61x251_device *cam = video_drvdata(filp);
 
        switch (cmd) {
 
@@ -2490,7 +2490,7 @@ static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp,
 static int et61x251_ioctl(struct inode* inode, struct file* filp,
                         unsigned int cmd, unsigned long arg)
 {
-       struct et61x251_device* cam = video_get_drvdata(video_devdata(filp));
+       struct et61x251_device *cam = video_drvdata(filp);
        int err = 0;
 
        if (mutex_lock_interruptible(&cam->fileop_mutex))
index 0178b49da0c18639a0cb7fa0e4d16c547f1810f3..ff81049e936ddfc4c1db5784d2342073467d2c28 100644 (file)
@@ -149,6 +149,7 @@ static int saa5246a_probe(struct i2c_adapter *adap)
 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(video_get_drvdata(vd));
@@ -581,8 +582,7 @@ static inline int saa5246a_stop_dau(struct saa5246a_device *t,
 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 = video_get_drvdata(vd);
+       struct saa5246a_device *t = video_drvdata(file);
 
        switch(cmd)
        {
@@ -723,8 +723,7 @@ static inline unsigned int vtx_fix_command(unsigned int cmd)
 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 = video_get_drvdata(vd);
+       struct saa5246a_device *t = video_drvdata(file);
        int err;
 
        cmd = vtx_fix_command(cmd);
@@ -736,8 +735,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 = video_get_drvdata(vd);
+       struct saa5246a_device *t = video_drvdata(file);
 
        if (t->client == NULL)
                return -ENODEV;
@@ -779,8 +777,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 = video_get_drvdata(vd);
+       struct saa5246a_device *t = video_drvdata(file);
 
        /* Stop all acquisition circuits. */
        i2c_senddata(t, SAA5246A_REGISTER_R1,
index c784715a0b0474616fad25d6a4c68c4ee22cd6cc..8517aa4f06816ae157b13404ca34cf6f9a4e1552 100644 (file)
@@ -319,8 +319,7 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
                            unsigned int cmd, void *arg)
 {
        static int virtual_mode = false;
-       struct video_device *vd = video_devdata(file);
-       struct saa5249_device *t = video_get_drvdata(vd);
+       struct saa5249_device *t = video_drvdata(file);
 
        switch(cmd)
        {
@@ -618,8 +617,7 @@ static inline unsigned int vtx_fix_command(unsigned int cmd)
 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 = video_get_drvdata(vd);
+       struct saa5249_device *t = video_drvdata(file);
        int err;
 
        cmd = vtx_fix_command(cmd);
@@ -631,8 +629,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 = video_get_drvdata(vd);
+       struct saa5249_device *t = video_drvdata(file);
        int pgbuf;
 
        if (t->client == NULL)
@@ -669,8 +666,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 = video_get_drvdata(vd);
+       struct saa5249_device *t = video_drvdata(file);
 
        i2c_senddata(t, 1, 0x20, -1);           /* Turn off CCT */
        i2c_senddata(t, 5, 3, 3, -1);           /* Turn off TV-display */
index 2da6938718f2c1a7969065f24b575d4615afdea5..4b76c45c148c5a1ee8334c022caa69b7f9e99917 100644 (file)
@@ -1746,7 +1746,7 @@ static int sn9c102_open(struct inode* inode, struct file* filp)
        if (!down_read_trylock(&sn9c102_dev_lock))
                return -ERESTARTSYS;
 
-       cam = video_get_drvdata(video_devdata(filp));
+       cam = video_drvdata(filp);
 
        if (wait_for_completion_interruptible(&cam->probe)) {
                up_read(&sn9c102_dev_lock);
@@ -1843,7 +1843,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp)
 
        down_write(&sn9c102_dev_lock);
 
-       cam = video_get_drvdata(video_devdata(filp));
+       cam = video_drvdata(filp);
 
        sn9c102_stop_transfer(cam);
        sn9c102_release_buffers(cam);
@@ -1863,7 +1863,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp)
 static ssize_t
 sn9c102_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
 {
-       struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+       struct sn9c102_device *cam = video_drvdata(filp);
        struct sn9c102_frame_t* f, * i;
        unsigned long lock_flags;
        long timeout;
@@ -1987,7 +1987,7 @@ exit:
 
 static unsigned int sn9c102_poll(struct file *filp, poll_table *wait)
 {
-       struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+       struct sn9c102_device *cam = video_drvdata(filp);
        struct sn9c102_frame_t* f;
        unsigned long lock_flags;
        unsigned int mask = 0;
@@ -2063,7 +2063,7 @@ static struct vm_operations_struct sn9c102_vm_ops = {
 
 static int sn9c102_mmap(struct file* filp, struct vm_area_struct *vma)
 {
-       struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+       struct sn9c102_device *cam = video_drvdata(filp);
        unsigned long size = vma->vm_end - vma->vm_start,
                      start = vma->vm_start;
        void *pos;
@@ -3075,7 +3075,7 @@ sn9c102_vidioc_s_audio(struct sn9c102_device* cam, void __user * arg)
 static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp,
                              unsigned int cmd, void __user * arg)
 {
-       struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+       struct sn9c102_device *cam = video_drvdata(filp);
 
        switch (cmd) {
 
@@ -3179,7 +3179,7 @@ static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp,
 static int sn9c102_ioctl(struct inode* inode, struct file* filp,
                         unsigned int cmd, unsigned long arg)
 {
-       struct sn9c102_device* cam = video_get_drvdata(video_devdata(filp));
+       struct sn9c102_device *cam = video_drvdata(filp);
        int err = 0;
 
        if (mutex_lock_interruptible(&cam->fileop_mutex))
index 1ffcc393fcbb810f4e9437a8933b1409d809d905..7a127d6bfdee5432770136980b3899afc6f25825 100644 (file)
@@ -472,8 +472,7 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign
 static int
 vicam_open(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vicam_camera *cam = video_get_drvdata(dev);
+       struct vicam_camera *cam = video_drvdata(file);
 
        DBG("open\n");
 
index b76295a5be8b9ac5dfce7500bfdbbb7363425bdb..782ee643601cb1524f3d3be8018a8a6012bb5543 100644 (file)
@@ -360,9 +360,7 @@ static void usbvision_remove_sysfs(struct video_device *vdev)
  */
 static int usbvision_v4l2_open(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int errCode = 0;
 
        PDEBUG(DBG_IO, "open");
@@ -439,9 +437,7 @@ static int usbvision_v4l2_open(struct inode *inode, struct file *file)
  */
 static int usbvision_v4l2_close(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        PDEBUG(DBG_IO, "close");
        mutex_lock(&usbvision->lock);
@@ -486,9 +482,7 @@ static int usbvision_v4l2_close(struct inode *inode, struct file *file)
 static int vidioc_g_register (struct file *file, void *priv,
                                struct v4l2_register *reg)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int errCode;
 
        if (!v4l2_chip_match_host(reg->match_type, reg->match_chip))
@@ -507,9 +501,7 @@ static int vidioc_g_register (struct file *file, void *priv,
 static int vidioc_s_register (struct file *file, void *priv,
                                struct v4l2_register *reg)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int errCode;
 
        if (!v4l2_chip_match_host(reg->match_type, reg->match_chip))
@@ -528,9 +520,7 @@ static int vidioc_s_register (struct file *file, void *priv,
 static int vidioc_querycap (struct file *file, void  *priv,
                                        struct v4l2_capability *vc)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        strlcpy(vc->driver, "USBVision", sizeof(vc->driver));
        strlcpy(vc->card,
@@ -550,9 +540,7 @@ static int vidioc_querycap (struct file *file, void  *priv,
 static int vidioc_enum_input (struct file *file, void *priv,
                                struct v4l2_input *vi)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int chan;
 
        if ((vi->index >= usbvision->video_inputs) || (vi->index < 0) )
@@ -605,9 +593,7 @@ static int vidioc_enum_input (struct file *file, void *priv,
 
 static int vidioc_g_input (struct file *file, void *priv, unsigned int *input)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        *input = usbvision->ctl_input;
        return 0;
@@ -615,9 +601,7 @@ static int vidioc_g_input (struct file *file, void *priv, unsigned int *input)
 
 static int vidioc_s_input (struct file *file, void *priv, unsigned int input)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        if ((input >= usbvision->video_inputs) || (input < 0) )
                return -EINVAL;
@@ -634,9 +618,8 @@ static int vidioc_s_input (struct file *file, void *priv, unsigned int input)
 
 static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
+
        usbvision->tvnormId=*id;
 
        mutex_lock(&usbvision->lock);
@@ -652,9 +635,7 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id)
 static int vidioc_g_tuner (struct file *file, void *priv,
                                struct v4l2_tuner *vt)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        if (!usbvision->have_tuner || vt->index)        // Only tuner 0
                return -EINVAL;
@@ -673,9 +654,7 @@ static int vidioc_g_tuner (struct file *file, void *priv,
 static int vidioc_s_tuner (struct file *file, void *priv,
                                struct v4l2_tuner *vt)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        // Only no or one tuner for now
        if (!usbvision->have_tuner || vt->index)
@@ -689,9 +668,7 @@ static int vidioc_s_tuner (struct file *file, void *priv,
 static int vidioc_g_frequency (struct file *file, void *priv,
                                struct v4l2_frequency *freq)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        freq->tuner = 0; // Only one tuner
        if(usbvision->radio) {
@@ -707,9 +684,7 @@ static int vidioc_g_frequency (struct file *file, void *priv,
 static int vidioc_s_frequency (struct file *file, void *priv,
                                struct v4l2_frequency *freq)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        // Only no or one tuner for now
        if (!usbvision->have_tuner || freq->tuner)
@@ -723,9 +698,7 @@ static int vidioc_s_frequency (struct file *file, void *priv,
 
 static int vidioc_g_audio (struct file *file, void *priv, struct v4l2_audio *a)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        memset(a,0,sizeof(*a));
        if(usbvision->radio) {
@@ -750,9 +723,7 @@ static int vidioc_s_audio (struct file *file, void *fh,
 static int vidioc_queryctrl (struct file *file, void *priv,
                            struct v4l2_queryctrl *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int id=ctrl->id;
 
        memset(ctrl,0,sizeof(*ctrl));
@@ -769,9 +740,7 @@ static int vidioc_queryctrl (struct file *file, void *priv,
 static int vidioc_g_ctrl (struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        call_i2c_clients(usbvision, VIDIOC_G_CTRL, ctrl);
 
        return 0;
@@ -780,9 +749,7 @@ static int vidioc_g_ctrl (struct file *file, void *priv,
 static int vidioc_s_ctrl (struct file *file, void *priv,
                                struct v4l2_control *ctrl)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        call_i2c_clients(usbvision, VIDIOC_S_CTRL, ctrl);
 
        return 0;
@@ -791,9 +758,7 @@ static int vidioc_s_ctrl (struct file *file, void *priv,
 static int vidioc_reqbufs (struct file *file,
                           void *priv, struct v4l2_requestbuffers *vr)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int ret;
 
        RESTRICT_TO_RANGE(vr->count,1,USBVISION_NUMFRAMES);
@@ -821,9 +786,7 @@ static int vidioc_reqbufs (struct file *file,
 static int vidioc_querybuf (struct file *file,
                            void *priv, struct v4l2_buffer *vb)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        struct usbvision_frame *frame;
 
        /* FIXME : must control
@@ -859,9 +822,7 @@ static int vidioc_querybuf (struct file *file,
 
 static int vidioc_qbuf (struct file *file, void *priv, struct v4l2_buffer *vb)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        struct usbvision_frame *frame;
        unsigned long lock_flags;
 
@@ -898,9 +859,7 @@ static int vidioc_qbuf (struct file *file, void *priv, struct v4l2_buffer *vb)
 
 static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *vb)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int ret;
        struct usbvision_frame *f;
        unsigned long lock_flags;
@@ -941,9 +900,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *vb)
 
 static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int b=V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
        usbvision->streaming = Stream_On;
@@ -955,9 +912,7 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
 static int vidioc_streamoff(struct file *file,
                            void *priv, enum v4l2_buf_type type)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int b=V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
        if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
@@ -990,9 +945,7 @@ static int vidioc_enum_fmt_vid_cap (struct file *file, void  *priv,
 static int vidioc_g_fmt_vid_cap (struct file *file, void *priv,
                                        struct v4l2_format *vf)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        vf->fmt.pix.width = usbvision->curwidth;
        vf->fmt.pix.height = usbvision->curheight;
        vf->fmt.pix.pixelformat = usbvision->palette.format;
@@ -1008,9 +961,7 @@ static int vidioc_g_fmt_vid_cap (struct file *file, void *priv,
 static int vidioc_try_fmt_vid_cap (struct file *file, void *priv,
                               struct v4l2_format *vf)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int formatIdx;
 
        /* Find requested format in available ones */
@@ -1038,9 +989,7 @@ static int vidioc_try_fmt_vid_cap (struct file *file, void *priv,
 static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
                               struct v4l2_format *vf)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int ret;
 
        if( 0 != (ret=vidioc_try_fmt_vid_cap (file, priv, vf)) ) {
@@ -1068,9 +1017,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
 static ssize_t usbvision_v4l2_read(struct file *file, char __user *buf,
                      size_t count, loff_t *ppos)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int noblock = file->f_flags & O_NONBLOCK;
        unsigned long lock_flags;
 
@@ -1179,10 +1126,7 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
                start = vma->vm_start;
        void *pos;
        u32 i;
-
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
 
        PDEBUG(DBG_MMAP, "mmap");
 
@@ -1239,9 +1183,7 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
  */
 static int usbvision_radio_open(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int errCode = 0;
 
        PDEBUG(DBG_IO, "%s:", __func__);
@@ -1291,9 +1233,7 @@ out:
 
 static int usbvision_radio_close(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct usb_usbvision *usbvision =
-               (struct usb_usbvision *) video_get_drvdata(dev);
+       struct usb_usbvision *usbvision = video_drvdata(file);
        int errCode = 0;
 
        PDEBUG(DBG_IO, "");
index d7bd71be40a9d8f76afd3a71c12b5025c714867d..d4758c8e13ad48ea8825d26355cad70219b43b2c 100644 (file)
@@ -400,15 +400,13 @@ static int uvc_has_privileges(struct uvc_fh *handle)
 
 static int uvc_v4l2_open(struct inode *inode, struct file *file)
 {
-       struct video_device *vdev;
        struct uvc_video_device *video;
        struct uvc_fh *handle;
        int ret = 0;
 
        uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_open\n");
        mutex_lock(&uvc_driver.open_mutex);
-       vdev = video_devdata(file);
-       video = video_get_drvdata(vdev);
+       video = video_drvdata(file);
 
        if (video->dev->state & UVC_DEV_DISCONNECTED) {
                ret = -ENODEV;
@@ -440,8 +438,7 @@ done:
 
 static int uvc_v4l2_release(struct inode *inode, struct file *file)
 {
-       struct video_device *vdev = video_devdata(file);
-       struct uvc_video_device *video = video_get_drvdata(vdev);
+       struct uvc_video_device *video = video_drvdata(file);
        struct uvc_fh *handle = (struct uvc_fh *)file->private_data;
 
        uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n");
@@ -1031,8 +1028,7 @@ static struct vm_operations_struct uvc_vm_ops = {
 
 static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       struct video_device *vdev = video_devdata(file);
-       struct uvc_video_device *video = video_get_drvdata(vdev);
+       struct uvc_video_device *video = video_drvdata(file);
        struct uvc_buffer *uninitialized_var(buffer);
        struct page *page;
        unsigned long addr, start, size;
@@ -1085,8 +1081,7 @@ done:
 
 static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait)
 {
-       struct video_device *vdev = video_devdata(file);
-       struct uvc_video_device *video = video_get_drvdata(vdev);
+       struct uvc_video_device *video = video_drvdata(file);
 
        uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n");
 
index ca421cc84f8fd95e0a5acff82bd272d5bf7e0463..8ec57df1904f1e83d4940f395060459ecde38733 100644 (file)
@@ -4024,8 +4024,7 @@ out:
 
 static int vino_open(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vino_channel_settings *vcs = video_get_drvdata(dev);
+       struct vino_channel_settings *vcs = video_drvdata(file);
        int ret = 0;
        dprintk("open(): channel = %c\n",
               (vcs->channel == VINO_CHANNEL_A) ? 'A' : 'B');
@@ -4056,8 +4055,7 @@ static int vino_open(struct inode *inode, struct file *file)
 
 static int vino_close(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vino_channel_settings *vcs = video_get_drvdata(dev);
+       struct vino_channel_settings *vcs = video_drvdata(file);
        dprintk("close():\n");
 
        mutex_lock(&vcs->mutex);
@@ -4100,8 +4098,7 @@ static struct vm_operations_struct vino_vm_ops = {
 
 static int vino_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vino_channel_settings *vcs = video_get_drvdata(dev);
+       struct vino_channel_settings *vcs = video_drvdata(file);
 
        unsigned long start = vma->vm_start;
        unsigned long size = vma->vm_end - vma->vm_start;
@@ -4206,8 +4203,7 @@ out:
 
 static unsigned int vino_poll(struct file *file, poll_table *pt)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vino_channel_settings *vcs = video_get_drvdata(dev);
+       struct vino_channel_settings *vcs = video_drvdata(file);
        unsigned int outgoing;
        unsigned int ret = 0;
 
@@ -4247,8 +4243,7 @@ error:
 static int vino_do_ioctl(struct inode *inode, struct file *file,
                      unsigned int cmd, void *arg)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vino_channel_settings *vcs = video_get_drvdata(dev);
+       struct vino_channel_settings *vcs = video_drvdata(file);
 
 #ifdef VINO_DEBUG
        switch (_IOC_TYPE(cmd)) {
@@ -4355,8 +4350,7 @@ static int vino_do_ioctl(struct inode *inode, struct file *file,
 static int vino_ioctl(struct inode *inode, struct file *file,
                      unsigned int cmd, unsigned long arg)
 {
-       struct video_device *dev = video_devdata(file);
-       struct vino_channel_settings *vcs = video_get_drvdata(dev);
+       struct vino_channel_settings *vcs = video_drvdata(file);
        int ret;
 
        if (mutex_lock_interruptible(&vcs->mutex))
index 14ebb15837fbaafa6194b707c60ce2892c8de37e..b2dbe48a92bbd72360b1fec3dea0e59806dc671f 100644 (file)
@@ -187,16 +187,14 @@ static ssize_t w9966_v4l_read(struct file *file, char __user *buf,
 
 static int w9966_exclusive_open(struct inode *inode, struct file *file)
 {
-       struct video_device *vdev = video_devdata(file);
-       struct w9966_dev *cam = video_get_drvdata(vdev);
+       struct w9966_dev *cam = video_drvdata(file);
 
        return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0;
 }
 
 static int w9966_exclusive_release(struct inode *inode, struct file *file)
 {
-       struct video_device *vdev = video_devdata(file);
-       struct w9966_dev *cam = video_get_drvdata(vdev);
+       struct w9966_dev *cam = video_drvdata(file);
 
        clear_bit(0, &cam->in_use);
        return 0;
@@ -732,8 +730,7 @@ static int w9966_wReg_i2c(struct w9966_dev* cam, int reg, int data)
 static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file,
                              unsigned int cmd, void *arg)
 {
-       struct video_device *vdev = video_devdata(file);
-       struct w9966_dev *cam = video_get_drvdata(vdev);
+       struct w9966_dev *cam = video_drvdata(file);
 
        switch(cmd)
        {
@@ -891,8 +888,7 @@ static int w9966_v4l_ioctl(struct inode *inode, struct file *file,
 static ssize_t w9966_v4l_read(struct file *file, char  __user *buf,
                              size_t count, loff_t *ppos)
 {
-       struct video_device *vdev = video_devdata(file);
-       struct w9966_dev *cam = video_get_drvdata(vdev);
+       struct w9966_dev *cam = video_drvdata(file);
        unsigned char addr = 0xa0;      // ECP, read, CCD-transfer, 00000
        unsigned char __user *dest = (unsigned char __user *)buf;
        unsigned long dleft = count;
index 0c3287734c93f0b77900cb2c9ca6156ee2de592d..6a0902bcba6bee88a250b0511cee48269d9c57bf 100644 (file)
@@ -657,7 +657,7 @@ static int zc0301_open(struct inode* inode, struct file* filp)
        if (!down_read_trylock(&zc0301_dev_lock))
                return -EAGAIN;
 
-       cam = video_get_drvdata(video_devdata(filp));
+       cam = video_drvdata(filp);
 
        if (wait_for_completion_interruptible(&cam->probe)) {
                up_read(&zc0301_dev_lock);
@@ -739,7 +739,7 @@ static int zc0301_release(struct inode* inode, struct file* filp)
 
        down_write(&zc0301_dev_lock);
 
-       cam = video_get_drvdata(video_devdata(filp));
+       cam = video_drvdata(filp);
 
        zc0301_stop_transfer(cam);
        zc0301_release_buffers(cam);
@@ -759,7 +759,7 @@ static int zc0301_release(struct inode* inode, struct file* filp)
 static ssize_t
 zc0301_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
 {
-       struct zc0301_device* cam = video_get_drvdata(video_devdata(filp));
+       struct zc0301_device *cam = video_drvdata(filp);
        struct zc0301_frame_t* f, * i;
        unsigned long lock_flags;
        long timeout;
@@ -866,7 +866,7 @@ exit:
 
 static unsigned int zc0301_poll(struct file *filp, poll_table *wait)
 {
-       struct zc0301_device* cam = video_get_drvdata(video_devdata(filp));
+       struct zc0301_device *cam = video_drvdata(filp);
        struct zc0301_frame_t* f;
        unsigned long lock_flags;
        unsigned int mask = 0;
@@ -941,7 +941,7 @@ static struct vm_operations_struct zc0301_vm_ops = {
 
 static int zc0301_mmap(struct file* filp, struct vm_area_struct *vma)
 {
-       struct zc0301_device* cam = video_get_drvdata(video_devdata(filp));
+       struct zc0301_device *cam = video_drvdata(filp);
        unsigned long size = vma->vm_end - vma->vm_start,
                      start = vma->vm_start;
        void *pos;
@@ -1796,7 +1796,7 @@ zc0301_vidioc_s_parm(struct zc0301_device* cam, void __user * arg)
 static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp,
                             unsigned int cmd, void __user * arg)
 {
-       struct zc0301_device* cam = video_get_drvdata(video_devdata(filp));
+       struct zc0301_device *cam = video_drvdata(filp);
 
        switch (cmd) {
 
@@ -1891,7 +1891,7 @@ static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp,
 static int zc0301_ioctl(struct inode* inode, struct file* filp,
                        unsigned int cmd, unsigned long arg)
 {
-       struct zc0301_device* cam = video_get_drvdata(video_devdata(filp));
+       struct zc0301_device *cam = video_drvdata(filp);
        int err = 0;
 
        if (mutex_lock_interruptible(&cam->fileop_mutex))
index 621d7fe3074bf15c538044ea5bc7cad58ad76e92..c13a178383ba0215e3edf14fca8d902973c88cc6 100644 (file)
@@ -87,8 +87,7 @@ static void snd_tea575x_set_freq(struct snd_tea575x *tea)
 static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
                             unsigned int cmd, unsigned long data)
 {
-       struct video_device *dev = video_devdata(file);
-       struct snd_tea575x *tea = video_get_drvdata(dev);
+       struct snd_tea575x *tea = video_drvdata(file);
        void __user *arg = (void __user *)data;
        
        switch(cmd) {
@@ -177,16 +176,14 @@ static void snd_tea575x_release(struct video_device *vfd)
 
 static int snd_tea575x_exclusive_open(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct snd_tea575x *tea = video_get_drvdata(dev);
+       struct snd_tea575x *tea = video_drvdata(file);
 
        return test_and_set_bit(0, &tea->in_use) ? -EBUSY : 0;
 }
 
 static int snd_tea575x_exclusive_release(struct inode *inode, struct file *file)
 {
-       struct video_device *dev = video_devdata(file);
-       struct snd_tea575x *tea = video_get_drvdata(dev);
+       struct snd_tea575x *tea = video_drvdata(file);
 
        clear_bit(0, &tea->in_use);
        return 0;