]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (8428): videodev: rename 'dev' to 'parent'
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 20 Jul 2008 09:31:39 +0000 (06:31 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 23 Jul 2008 19:42:49 +0000 (16:42 -0300)
The field 'dev' is not the video device, but the parent of the video device.
Rename accordingly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
25 files changed:
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/cafe_ccic.c
drivers/media/video/cx18/cx18-streams.c
drivers/media/video/cx23885/cx23885-417.c
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx88/cx88-core.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/gspca/gspca.c
drivers/media/video/ivtv/ivtv-streams.c
drivers/media/video/meye.c
drivers/media/video/mt9m001.c
drivers/media/video/ov511.c
drivers/media/video/pwc/pwc-if.c
drivers/media/video/s2255drv.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-empress.c
drivers/media/video/soc_camera.c
drivers/media/video/stk-webcam.c
drivers/media/video/stv680.c
drivers/media/video/usbvideo/usbvideo.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/uvc/uvc_driver.c
drivers/media/video/v4l2-dev.c
drivers/media/video/w9968cf.c
include/media/v4l2-dev.h

index 0ea559a7fe59ea3dba50fc435dfd57900477592f..3dda84d115d1536c031a817b015209aaa8072230 100644 (file)
@@ -164,7 +164,7 @@ static ssize_t show_card(struct device *cd,
                         struct device_attribute *attr, char *buf)
 {
        struct video_device *vfd = container_of(cd, struct video_device, class_dev);
-       struct bttv *btv = dev_get_drvdata(vfd->dev);
+       struct bttv *btv = dev_get_drvdata(vfd->parent);
        return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
 }
 static DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
@@ -4185,7 +4185,7 @@ static struct video_device *vdev_init(struct bttv *btv,
                return NULL;
        *vfd = *template;
        vfd->minor   = -1;
-       vfd->dev     = &btv->c.pci->dev;
+       vfd->parent  = &btv->c.pci->dev;
        vfd->release = video_device_release;
        vfd->type    = type;
        vfd->debug   = bttv_debug;
index d99453faaab79715d3723492e99a9ea9d9a92116..ebcc8ad6271f14d5d95adeef071f0f53964e80bf 100644 (file)
@@ -2157,7 +2157,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,
        cam->v4ldev = cafe_v4l_template;
        cam->v4ldev.debug = 0;
 //     cam->v4ldev.debug = V4L2_DEBUG_IOCTL_ARG;
-       cam->v4ldev.dev = &pdev->dev;
+       cam->v4ldev.parent = &pdev->dev;
        ret = video_register_device(&cam->v4ldev, VFL_TYPE_GRABBER, -1);
        if (ret)
                goto out_smbus;
index 1728b1d832a9ca2eef5f147553da2e1d97a9e4f3..210a2416b320c1205a6f5ffb0409db79d6c69ca6 100644 (file)
@@ -194,7 +194,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
                        cx->num);
 
        s->v4l2dev->minor = minor;
-       s->v4l2dev->dev = &cx->dev->dev;
+       s->v4l2dev->parent = &cx->dev->dev;
        s->v4l2dev->fops = cx18_stream_info[type].fops;
        s->v4l2dev->release = video_device_release;
        s->v4l2dev->tvnorms = V4L2_STD_ALL;
index e7ef093265af0d2275ca149a98355f0423d7949c..1b252976edaced82f65ce692290013ccdda5ea51 100644 (file)
@@ -1766,7 +1766,7 @@ static struct video_device *cx23885_video_dev_alloc(
        vfd->minor   = -1;
        snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name,
                type, cx23885_boards[tsport->dev->board].name);
-       vfd->dev     = &pci->dev;
+       vfd->parent  = &pci->dev;
        vfd->release = video_device_release;
        return vfd;
 }
index 043fc4e5c586c82ec547d595a48e8a6ed0580edf..3b807ba874f127c0f1cdab38b7686fdb0918b67d 100644 (file)
@@ -326,7 +326,7 @@ struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
                return NULL;
        *vfd = *template;
        vfd->minor   = -1;
-       vfd->dev     = &pci->dev;
+       vfd->parent  = &pci->dev;
        vfd->release = video_device_release;
        snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
                 dev->name, type, cx23885_boards[dev->board].name);
index 60eeda3057e9e8552bf0bb5361987e6f8d7b04d7..2c0582e05594971a95d5b2d649aab7b29a10244e 100644 (file)
@@ -1006,7 +1006,7 @@ struct video_device *cx88_vdev_init(struct cx88_core *core,
                return NULL;
        *vfd = *template;
        vfd->minor   = -1;
-       vfd->dev     = &pci->dev;
+       vfd->parent  = &pci->dev;
        vfd->release = video_device_release;
        snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
                 core->name, type, core->board.name);
index 2d9f14d2a00b817119abeb1d5f29a2886014232d..838e7ecfd8652a4051ae5ccd880ca1dbd1776c25 100644 (file)
@@ -1892,7 +1892,7 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev,
                return NULL;
        *vfd = *template;
        vfd->minor   = -1;
-       vfd->dev = &dev->udev->dev;
+       vfd->parent = &dev->udev->dev;
        vfd->release = video_device_release;
        vfd->type = type;
        vfd->debug = video_debug;
index 16e367cec76077981c2d398754d0ff1e3018e98c..f5b77deab72df291ac2c043f2fadae5c80571220 100644 (file)
@@ -1740,7 +1740,7 @@ int gspca_dev_probe(struct usb_interface *intf,
 
        /* init video stuff */
        memcpy(&gspca_dev->vdev, &gspca_template, sizeof gspca_template);
-       gspca_dev->vdev.dev = &dev->dev;
+       gspca_dev->vdev.parent = &dev->dev;
        memcpy(&gspca_dev->fops, &dev_fops, sizeof gspca_dev->fops);
        gspca_dev->vdev.fops = &gspca_dev->fops;
        gspca_dev->fops.owner = module;         /* module protection */
index f8883b487f4a9dbbee6cda1d1edd0c0fb64fd2c6..b883c4e08fbd7e79951f85204c07189c72f22081 100644 (file)
@@ -217,7 +217,7 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)
                        itv->num, s->name);
 
        s->v4l2dev->minor = minor;
-       s->v4l2dev->dev = &itv->dev->dev;
+       s->v4l2dev->parent = &itv->dev->dev;
        s->v4l2dev->fops = ivtv_stream_info[type].fops;
        s->v4l2dev->release = video_device_release;
        s->v4l2dev->tvnorms = V4L2_STD_ALL;
index 2fb5854cf6f039d58967b9ad07735c0a73e5f9b3..0045367a66f1ddb696aeb1083695810d994e1dc3 100644 (file)
@@ -1801,7 +1801,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
        }
 
        memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
-       meye.video_dev->dev = &meye.mchip_dev->dev;
+       meye.video_dev->parent = &meye.mchip_dev->dev;
 
        if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
                printk(KERN_ERR "meye: unable to power on the camera\n");
index ee43499544c13d9f01cd12d1c973762099475db8..554d2295484e5f1b02f7fec28c34768fa596d0dd 100644 (file)
@@ -120,7 +120,7 @@ static int mt9m001_init(struct soc_camera_device *icd)
        int ret;
 
        /* Disable chip, synchronous option update */
-       dev_dbg(icd->vdev->dev, "%s\n", __func__);
+       dev_dbg(icd->vdev->parent, "%s\n", __func__);
 
        ret = reg_write(icd, MT9M001_RESET, 1);
        if (ret >= 0)
index eafb0c7736e630bff974b002db478702aeee5100..b72e5660bc193c5327fb161989e8df7b549f9fc2 100644 (file)
@@ -5833,7 +5833,7 @@ ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id)
                goto error;
 
        memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev));
-       ov->vdev->dev = &intf->dev;
+       ov->vdev->parent = &intf->dev;
        video_set_drvdata(ov->vdev, ov);
 
        for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) {
index 423fa7c2d0c9b465fa54f0a6cb761ea06e1cd420..b4de82115e5b68e2addfe1ad04f22199d06355f0 100644 (file)
@@ -1767,7 +1767,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
                return -ENOMEM;
        }
        memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
-       pdev->vdev->dev = &(udev->dev);
+       pdev->vdev->parent = &(udev->dev);
        strcpy(pdev->vdev->name, name);
        pdev->vdev->owner = THIS_MODULE;
        video_set_drvdata(pdev->vdev, pdev);
index 04eb2c3fabd8767ad6e8d282aec7660d426a514e..5f8cd3de98e30aa62acfb82156ea35a17e022735 100644 (file)
@@ -1706,7 +1706,7 @@ static int s2255_probe_v4l(struct s2255_dev *dev)
                /* register 4 video devices */
                dev->vdev[i] = video_device_alloc();
                memcpy(dev->vdev[i], &template, sizeof(struct video_device));
-               dev->vdev[i]->dev = &dev->interface->dev;
+               dev->vdev[i]->parent = &dev->interface->dev;
                if (video_nr == -1)
                        ret = video_register_device(dev->vdev[i],
                                                    VFL_TYPE_GRABBER,
index cfee84ee7a88a3e5c0a187ddd96532afe700549d..f3e7a598e4b522b1d2d4d457ef53bb8116258889 100644 (file)
@@ -798,7 +798,7 @@ static struct video_device *vdev_init(struct saa7134_dev *dev,
                return NULL;
        *vfd = *template;
        vfd->minor   = -1;
-       vfd->dev     = &dev->pci->dev;
+       vfd->parent  = &dev->pci->dev;
        vfd->release = video_device_release;
        vfd->debug   = video_debug;
        snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
index 2a5ab957542dfacab6e3e73dfe77da44c2975280..3854cc29752d30472be07839bf08d4cc7c9e02f5 100644 (file)
@@ -465,7 +465,7 @@ static int empress_init(struct saa7134_dev *dev)
        if (NULL == dev->empress_dev)
                return -ENOMEM;
        *(dev->empress_dev) = saa7134_empress_template;
-       dev->empress_dev->dev     = &dev->pci->dev;
+       dev->empress_dev->parent  = &dev->pci->dev;
        dev->empress_dev->release = video_device_release;
        snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name),
                 "%s empress (%s)", dev->name,
index e39b98f1eca4e97edc94ca6008436eef20449fdd..58c8c39b9597edd83e565e5514a44a3f2559fb59 100644 (file)
@@ -193,7 +193,7 @@ static int soc_camera_open(struct inode *inode, struct file *file)
        mutex_lock(&video_lock);
 
        vdev = video_devdata(file);
-       icd = container_of(vdev->dev, struct soc_camera_device, dev);
+       icd = container_of(vdev->parent, struct soc_camera_device, dev);
        ici = to_soc_camera_host(icd->dev.parent);
 
        if (!try_module_get(icd->ops->owner)) {
@@ -258,7 +258,7 @@ static int soc_camera_close(struct inode *inode, struct file *file)
 
        vfree(icf);
 
-       dev_dbg(vdev->dev, "camera device close\n");
+       dev_dbg(vdev->parent, "camera device close\n");
 
        return 0;
 }
@@ -271,7 +271,7 @@ static ssize_t soc_camera_read(struct file *file, char __user *buf,
        struct video_device *vdev = icd->vdev;
        int err = -EINVAL;
 
-       dev_err(vdev->dev, "camera device read not implemented\n");
+       dev_err(vdev->parent, "camera device read not implemented\n");
 
        return err;
 }
@@ -877,7 +877,7 @@ int soc_camera_video_start(struct soc_camera_device *icd)
 
        strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name));
        /* Maybe better &ici->dev */
-       vdev->dev               = &icd->dev;
+       vdev->parent            = &icd->dev;
        vdev->type              = VID_TYPE_CAPTURE;
        vdev->current_norm      = V4L2_STD_UNKNOWN;
        vdev->fops              = &soc_camera_fops;
@@ -915,7 +915,7 @@ int soc_camera_video_start(struct soc_camera_device *icd)
 
        err = video_register_device(vdev, VFL_TYPE_GRABBER, vdev->minor);
        if (err < 0) {
-               dev_err(vdev->dev, "video_register_device failed\n");
+               dev_err(vdev->parent, "video_register_device failed\n");
                goto evidregd;
        }
        icd->vdev = vdev;
index f308c38d744fb2e7747328baf339492282ca8beb..5998a5483194e2c75aa18b98837a5faaa4b16721 100644 (file)
@@ -1369,7 +1369,7 @@ static int stk_register_video_device(struct stk_camera *dev)
 
        dev->vdev = stk_v4l_data;
        dev->vdev.debug = debug;
-       dev->vdev.dev = &dev->interface->dev;
+       dev->vdev.parent = &dev->interface->dev;
        dev->vdev.priv = dev;
        err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1);
        if (err)
index d7f130bedb5f47a05f6eddff87634e6af54d25c4..27e2f4aac13d872d4d86f8965266594d995d462d 100644 (file)
@@ -1454,7 +1454,7 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
                goto error;
        }
        memcpy(stv680->vdev, &stv680_template, sizeof(stv680_template));
-       stv680->vdev->dev = &intf->dev;
+       stv680->vdev->parent = &intf->dev;
        video_set_drvdata(stv680->vdev, stv680);
 
        memcpy (stv680->vdev->name, stv680->camera_name, strlen (stv680->camera_name));
index 4128ee20b64e3eee52db9e720b44d2f143a63f2b..7e6ab2910c138a2ead2bfc44d19f1c9e301df9b6 100644 (file)
@@ -1040,7 +1040,7 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
                err("%s: uvd->dev == NULL", __func__);
                return -EINVAL;
        }
-       uvd->vdev.dev = &uvd->dev->dev;
+       uvd->vdev.parent = &uvd->dev->dev;
        if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
                err("%s: video_register_device failed", __func__);
                return -EPIPE;
index cd6c41d67899280d9628e3f4e29fd3e57826866d..899906d954aa9a6d4b3e106bab60e7803be2c2d0 100644 (file)
@@ -1506,7 +1506,7 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision,
        }
        *vdev = *vdev_template;
 //     vdev->minor   = -1;
-       vdev->dev     = &usb_dev->dev;
+       vdev->parent  = &usb_dev->dev;
        snprintf(vdev->name, sizeof(vdev->name), "%s", name);
        video_set_drvdata(vdev, usbvision);
        return vdev;
index f2b2983fe06270eae97d10f6c1f4a4117a159fa1..79d6821c4741cb37411f5f826830115690cfc46f 100644 (file)
@@ -1458,7 +1458,7 @@ static int uvc_register_video(struct uvc_device *dev)
         * unregistered before the reference is released, so we don't need to
         * get another one.
         */
-       vdev->dev = &dev->intf->dev;
+       vdev->parent = &dev->intf->dev;
        vdev->type = 0;
        vdev->type2 = 0;
        vdev->minor = -1;
index 2dd82b16bc3545fe53c42cf5f2d21499f445bf45..9cc2cf1a1c9307bf572c7783ab7ae80dee1a2da0 100644 (file)
@@ -201,7 +201,7 @@ static int get_index(struct video_device *vdev, int num)
        for (i = 0; i < VIDEO_NUM_DEVICES; i++) {
                if (video_device[i] != NULL &&
                    video_device[i] != vdev &&
-                   video_device[i]->dev == vdev->dev) {
+                   video_device[i]->parent == vdev->parent) {
                        used |= 1 << video_device[i]->index;
                }
        }
@@ -323,8 +323,8 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
        memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev));
        vfd->class_dev.class = &video_class;
        vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
-       if (vfd->dev)
-               vfd->class_dev.parent = vfd->dev;
+       if (vfd->parent)
+               vfd->class_dev.parent = vfd->parent;
        sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base);
        ret = device_register(&vfd->class_dev);
        if (ret < 0) {
index 840522442d07d4a6316a76a7f658481da60de77f..3f5a59dc5f8f988dee97beded328a67780d88745 100644 (file)
@@ -3555,7 +3555,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        cam->v4ldev->minor = video_nr[dev_nr];
        cam->v4ldev->release = video_device_release;
        video_set_drvdata(cam->v4ldev, cam);
-       cam->v4ldev->dev = &cam->dev;
+       cam->v4ldev->parent = &cam->dev;
 
        err = video_register_device(cam->v4ldev, VFL_TYPE_GRABBER,
                                    video_nr[dev_nr]);
index 33f379b1ecfeac87bfaf3d0c3cdf92137e8af802..5ae261fbcb7eccfec37b112d8352edf8d431ea81 100644 (file)
@@ -89,7 +89,7 @@ struct video_device
 
        /* sysfs */
        struct device class_dev;        /* v4l device */
-       struct device *dev;             /* device parent */
+       struct device *parent;          /* device parent */
 
        /* device info */
        char name[32];