You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
V4L/DVB (8428): videodev: rename 'dev' to 'parent'
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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
27a5e6d3fc
commit
5e85e732f0
@@ -164,7 +164,7 @@ static ssize_t show_card(struct device *cd,
|
|||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
struct video_device *vfd = container_of(cd, struct video_device, class_dev);
|
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);
|
return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
|
||||||
}
|
}
|
||||||
static DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
|
static DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
|
||||||
@@ -4185,7 +4185,7 @@ static struct video_device *vdev_init(struct bttv *btv,
|
|||||||
return NULL;
|
return NULL;
|
||||||
*vfd = *template;
|
*vfd = *template;
|
||||||
vfd->minor = -1;
|
vfd->minor = -1;
|
||||||
vfd->dev = &btv->c.pci->dev;
|
vfd->parent = &btv->c.pci->dev;
|
||||||
vfd->release = video_device_release;
|
vfd->release = video_device_release;
|
||||||
vfd->type = type;
|
vfd->type = type;
|
||||||
vfd->debug = bttv_debug;
|
vfd->debug = bttv_debug;
|
||||||
|
|||||||
@@ -2157,7 +2157,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,
|
|||||||
cam->v4ldev = cafe_v4l_template;
|
cam->v4ldev = cafe_v4l_template;
|
||||||
cam->v4ldev.debug = 0;
|
cam->v4ldev.debug = 0;
|
||||||
// cam->v4ldev.debug = V4L2_DEBUG_IOCTL_ARG;
|
// 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);
|
ret = video_register_device(&cam->v4ldev, VFL_TYPE_GRABBER, -1);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_smbus;
|
goto out_smbus;
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
|
|||||||
cx->num);
|
cx->num);
|
||||||
|
|
||||||
s->v4l2dev->minor = minor;
|
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->fops = cx18_stream_info[type].fops;
|
||||||
s->v4l2dev->release = video_device_release;
|
s->v4l2dev->release = video_device_release;
|
||||||
s->v4l2dev->tvnorms = V4L2_STD_ALL;
|
s->v4l2dev->tvnorms = V4L2_STD_ALL;
|
||||||
|
|||||||
@@ -1766,7 +1766,7 @@ static struct video_device *cx23885_video_dev_alloc(
|
|||||||
vfd->minor = -1;
|
vfd->minor = -1;
|
||||||
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name,
|
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name,
|
||||||
type, cx23885_boards[tsport->dev->board].name);
|
type, cx23885_boards[tsport->dev->board].name);
|
||||||
vfd->dev = &pci->dev;
|
vfd->parent = &pci->dev;
|
||||||
vfd->release = video_device_release;
|
vfd->release = video_device_release;
|
||||||
return vfd;
|
return vfd;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
|
|||||||
return NULL;
|
return NULL;
|
||||||
*vfd = *template;
|
*vfd = *template;
|
||||||
vfd->minor = -1;
|
vfd->minor = -1;
|
||||||
vfd->dev = &pci->dev;
|
vfd->parent = &pci->dev;
|
||||||
vfd->release = video_device_release;
|
vfd->release = video_device_release;
|
||||||
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
|
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
|
||||||
dev->name, type, cx23885_boards[dev->board].name);
|
dev->name, type, cx23885_boards[dev->board].name);
|
||||||
|
|||||||
@@ -1006,7 +1006,7 @@ struct video_device *cx88_vdev_init(struct cx88_core *core,
|
|||||||
return NULL;
|
return NULL;
|
||||||
*vfd = *template;
|
*vfd = *template;
|
||||||
vfd->minor = -1;
|
vfd->minor = -1;
|
||||||
vfd->dev = &pci->dev;
|
vfd->parent = &pci->dev;
|
||||||
vfd->release = video_device_release;
|
vfd->release = video_device_release;
|
||||||
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
|
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
|
||||||
core->name, type, core->board.name);
|
core->name, type, core->board.name);
|
||||||
|
|||||||
@@ -1892,7 +1892,7 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev,
|
|||||||
return NULL;
|
return NULL;
|
||||||
*vfd = *template;
|
*vfd = *template;
|
||||||
vfd->minor = -1;
|
vfd->minor = -1;
|
||||||
vfd->dev = &dev->udev->dev;
|
vfd->parent = &dev->udev->dev;
|
||||||
vfd->release = video_device_release;
|
vfd->release = video_device_release;
|
||||||
vfd->type = type;
|
vfd->type = type;
|
||||||
vfd->debug = video_debug;
|
vfd->debug = video_debug;
|
||||||
|
|||||||
@@ -1740,7 +1740,7 @@ int gspca_dev_probe(struct usb_interface *intf,
|
|||||||
|
|
||||||
/* init video stuff */
|
/* init video stuff */
|
||||||
memcpy(&gspca_dev->vdev, &gspca_template, sizeof gspca_template);
|
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);
|
memcpy(&gspca_dev->fops, &dev_fops, sizeof gspca_dev->fops);
|
||||||
gspca_dev->vdev.fops = &gspca_dev->fops;
|
gspca_dev->vdev.fops = &gspca_dev->fops;
|
||||||
gspca_dev->fops.owner = module; /* module protection */
|
gspca_dev->fops.owner = module; /* module protection */
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)
|
|||||||
itv->num, s->name);
|
itv->num, s->name);
|
||||||
|
|
||||||
s->v4l2dev->minor = minor;
|
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->fops = ivtv_stream_info[type].fops;
|
||||||
s->v4l2dev->release = video_device_release;
|
s->v4l2dev->release = video_device_release;
|
||||||
s->v4l2dev->tvnorms = V4L2_STD_ALL;
|
s->v4l2dev->tvnorms = V4L2_STD_ALL;
|
||||||
|
|||||||
@@ -1801,7 +1801,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
|
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))) {
|
if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
|
||||||
printk(KERN_ERR "meye: unable to power on the camera\n");
|
printk(KERN_ERR "meye: unable to power on the camera\n");
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ static int mt9m001_init(struct soc_camera_device *icd)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Disable chip, synchronous option update */
|
/* 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);
|
ret = reg_write(icd, MT9M001_RESET, 1);
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
|
|||||||
@@ -5833,7 +5833,7 @@ ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev));
|
memcpy(ov->vdev, &vdev_template, sizeof(*ov->vdev));
|
||||||
ov->vdev->dev = &intf->dev;
|
ov->vdev->parent = &intf->dev;
|
||||||
video_set_drvdata(ov->vdev, ov);
|
video_set_drvdata(ov->vdev, ov);
|
||||||
|
|
||||||
for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) {
|
for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) {
|
||||||
|
|||||||
@@ -1767,7 +1767,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
|
memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
|
||||||
pdev->vdev->dev = &(udev->dev);
|
pdev->vdev->parent = &(udev->dev);
|
||||||
strcpy(pdev->vdev->name, name);
|
strcpy(pdev->vdev->name, name);
|
||||||
pdev->vdev->owner = THIS_MODULE;
|
pdev->vdev->owner = THIS_MODULE;
|
||||||
video_set_drvdata(pdev->vdev, pdev);
|
video_set_drvdata(pdev->vdev, pdev);
|
||||||
|
|||||||
@@ -1706,7 +1706,7 @@ static int s2255_probe_v4l(struct s2255_dev *dev)
|
|||||||
/* register 4 video devices */
|
/* register 4 video devices */
|
||||||
dev->vdev[i] = video_device_alloc();
|
dev->vdev[i] = video_device_alloc();
|
||||||
memcpy(dev->vdev[i], &template, sizeof(struct video_device));
|
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)
|
if (video_nr == -1)
|
||||||
ret = video_register_device(dev->vdev[i],
|
ret = video_register_device(dev->vdev[i],
|
||||||
VFL_TYPE_GRABBER,
|
VFL_TYPE_GRABBER,
|
||||||
|
|||||||
@@ -798,7 +798,7 @@ static struct video_device *vdev_init(struct saa7134_dev *dev,
|
|||||||
return NULL;
|
return NULL;
|
||||||
*vfd = *template;
|
*vfd = *template;
|
||||||
vfd->minor = -1;
|
vfd->minor = -1;
|
||||||
vfd->dev = &dev->pci->dev;
|
vfd->parent = &dev->pci->dev;
|
||||||
vfd->release = video_device_release;
|
vfd->release = video_device_release;
|
||||||
vfd->debug = video_debug;
|
vfd->debug = video_debug;
|
||||||
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
|
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ static int empress_init(struct saa7134_dev *dev)
|
|||||||
if (NULL == dev->empress_dev)
|
if (NULL == dev->empress_dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
*(dev->empress_dev) = saa7134_empress_template;
|
*(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;
|
dev->empress_dev->release = video_device_release;
|
||||||
snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name),
|
snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name),
|
||||||
"%s empress (%s)", dev->name,
|
"%s empress (%s)", dev->name,
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ static int soc_camera_open(struct inode *inode, struct file *file)
|
|||||||
mutex_lock(&video_lock);
|
mutex_lock(&video_lock);
|
||||||
|
|
||||||
vdev = video_devdata(file);
|
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);
|
ici = to_soc_camera_host(icd->dev.parent);
|
||||||
|
|
||||||
if (!try_module_get(icd->ops->owner)) {
|
if (!try_module_get(icd->ops->owner)) {
|
||||||
@@ -258,7 +258,7 @@ static int soc_camera_close(struct inode *inode, struct file *file)
|
|||||||
|
|
||||||
vfree(icf);
|
vfree(icf);
|
||||||
|
|
||||||
dev_dbg(vdev->dev, "camera device close\n");
|
dev_dbg(vdev->parent, "camera device close\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -271,7 +271,7 @@ static ssize_t soc_camera_read(struct file *file, char __user *buf,
|
|||||||
struct video_device *vdev = icd->vdev;
|
struct video_device *vdev = icd->vdev;
|
||||||
int err = -EINVAL;
|
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;
|
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));
|
strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name));
|
||||||
/* Maybe better &ici->dev */
|
/* Maybe better &ici->dev */
|
||||||
vdev->dev = &icd->dev;
|
vdev->parent = &icd->dev;
|
||||||
vdev->type = VID_TYPE_CAPTURE;
|
vdev->type = VID_TYPE_CAPTURE;
|
||||||
vdev->current_norm = V4L2_STD_UNKNOWN;
|
vdev->current_norm = V4L2_STD_UNKNOWN;
|
||||||
vdev->fops = &soc_camera_fops;
|
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);
|
err = video_register_device(vdev, VFL_TYPE_GRABBER, vdev->minor);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(vdev->dev, "video_register_device failed\n");
|
dev_err(vdev->parent, "video_register_device failed\n");
|
||||||
goto evidregd;
|
goto evidregd;
|
||||||
}
|
}
|
||||||
icd->vdev = vdev;
|
icd->vdev = vdev;
|
||||||
|
|||||||
@@ -1369,7 +1369,7 @@ static int stk_register_video_device(struct stk_camera *dev)
|
|||||||
|
|
||||||
dev->vdev = stk_v4l_data;
|
dev->vdev = stk_v4l_data;
|
||||||
dev->vdev.debug = debug;
|
dev->vdev.debug = debug;
|
||||||
dev->vdev.dev = &dev->interface->dev;
|
dev->vdev.parent = &dev->interface->dev;
|
||||||
dev->vdev.priv = dev;
|
dev->vdev.priv = dev;
|
||||||
err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1);
|
err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1);
|
||||||
if (err)
|
if (err)
|
||||||
|
|||||||
@@ -1454,7 +1454,7 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
memcpy(stv680->vdev, &stv680_template, sizeof(stv680_template));
|
memcpy(stv680->vdev, &stv680_template, sizeof(stv680_template));
|
||||||
stv680->vdev->dev = &intf->dev;
|
stv680->vdev->parent = &intf->dev;
|
||||||
video_set_drvdata(stv680->vdev, stv680);
|
video_set_drvdata(stv680->vdev, stv680);
|
||||||
|
|
||||||
memcpy (stv680->vdev->name, stv680->camera_name, strlen (stv680->camera_name));
|
memcpy (stv680->vdev->name, stv680->camera_name, strlen (stv680->camera_name));
|
||||||
|
|||||||
@@ -1040,7 +1040,7 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
|
|||||||
err("%s: uvd->dev == NULL", __func__);
|
err("%s: uvd->dev == NULL", __func__);
|
||||||
return -EINVAL;
|
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) {
|
if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
|
||||||
err("%s: video_register_device failed", __func__);
|
err("%s: video_register_device failed", __func__);
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user