diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-06-12 14:23:44 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-21 14:08:07 (GMT) |
commit | e5715cfb2802cb5988f856f84454645772f4e2f5 (patch) | |
tree | 6c7a88d6b489aa61c1cd098aac7adccd34f12730 | |
parent | 1c1d86a1ea07506c070cfb217a009d53990bdeb0 (diff) | |
download | linux-fsl-qoriq-e5715cfb2802cb5988f856f84454645772f4e2f5.tar.xz |
[media] cx88: set dev_parent to the correct parent PCI bus
The cx88 driver has one v4l2_device, but the video nodes are owned by two
different PCI busses. So the dev_parent pointer should be set to the correct
parent bus, otherwise sysfs won't show the correct device hierarchy.
This broke starting in 3.6 after a driver change, so this patch resurrects
the correct behavior.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/pci/cx88/cx88-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/pci/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c index c8f3dcc..ad59dc9 100644 --- a/drivers/media/pci/cx88/cx88-core.c +++ b/drivers/media/pci/cx88/cx88-core.c @@ -1034,7 +1034,14 @@ struct video_device *cx88_vdev_init(struct cx88_core *core, if (NULL == vfd) return NULL; *vfd = *template_; + /* + * The dev pointer of v4l2_device is NULL, instead we set the + * video_device dev_parent pointer to the correct PCI bus device. + * This driver is a rare example where there is one v4l2_device, + * but the video nodes have different parent (PCI) devices. + */ vfd->v4l2_dev = &core->v4l2_dev; + vfd->dev_parent = &pci->dev; vfd->release = video_device_release; snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", core->name, type, core->board.name); |