[media] marvell-ccic: fill in bus_info
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 5 Mar 2015 07:57:32 +0000 (04:57 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 10:39:22 +0000 (07:39 -0300)
The bus_info field of struct v4l2_querycap wasn't filled in and
v4l2-compliance complained about that. Fix this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/marvell-ccic/cafe-driver.c
drivers/media/platform/marvell-ccic/mcam-core.c
drivers/media/platform/marvell-ccic/mcam-core.h
drivers/media/platform/marvell-ccic/mmp-driver.c

index 5628453612469a624300a3e934cf1620928dc074..e857405b46fdf4871494e5cb4cc01de1c84028b9 100644 (file)
@@ -476,6 +476,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,
        mcam->plat_power_up = cafe_ctlr_power_up;
        mcam->plat_power_down = cafe_ctlr_power_down;
        mcam->dev = &pdev->dev;
+       snprintf(mcam->bus_info, sizeof(mcam->bus_info), "PCI:%s", pci_name(pdev));
        /*
         * Set the clock speed for the XO 1; I don't believe this
         * driver has ever run anywhere else.
index bf160dd0a329161321e1f88c7be602ae67efec8c..e83ca1fd614804700e96a9c1622695a791359dfc 100644 (file)
@@ -1388,8 +1388,11 @@ static int mcam_vidioc_dqbuf(struct file *filp, void *priv,
 static int mcam_vidioc_querycap(struct file *file, void *priv,
                struct v4l2_capability *cap)
 {
+       struct mcam_camera *cam = priv;
+
        strcpy(cap->driver, "marvell_ccic");
        strcpy(cap->card, "marvell_ccic");
+       strlcpy(cap->bus_info, cam->bus_info, sizeof(cap->bus_info));
        cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
                V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
        cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
index aa0c6eac254a4cd5813dd660d279334202e9e747..46bc7151a2002471cada58b83019c3f3265eb388 100644 (file)
@@ -163,6 +163,8 @@ struct mcam_camera {
        unsigned int nbufs;             /* How many are alloc'd */
        int next_buf;                   /* Next to consume (dev_lock) */
 
+       char bus_info[32];              /* querycap bus_info */
+
        /* DMA buffers - vmalloc mode */
 #ifdef MCAM_MODE_VMALLOC
        unsigned int dma_buf_size;      /* allocated size */
index 0ed9b3adfcdf4e26b11f50801d133b3566813458..b5f165a68566e172404d4ea3b96c7dcd5f530ed7 100644 (file)
@@ -371,6 +371,7 @@ static int mmpcam_probe(struct platform_device *pdev)
        mcam->lane = pdata->lane;
        mcam->chip_id = MCAM_ARMADA610;
        mcam->buffer_mode = B_DMA_sg;
+       strlcpy(mcam->bus_info, "platform:mmp-camera", sizeof(mcam->bus_info));
        spin_lock_init(&mcam->dev_lock);
        /*
         * Get our I/O memory.