]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/cafe_ccic.c
V4L/DVB (5366): Pvrusb2: Fix compilation warning for amd64 builds (use %zu instead...
[linux-2.6-omap-h63xx.git] / drivers / media / video / cafe_ccic.c
index e347c7ebc98415b6c8dc0d0d3f0492d0440740a4..710c11a682964b88f525a0517b9f3a2032f5ad70 100644 (file)
@@ -549,6 +549,7 @@ static int cafe_smbus_setup(struct cafe_camera *cam)
        adap->client_unregister = cafe_smbus_detach;
        adap->algo = &cafe_smbus_algo;
        strcpy(adap->name, "cafe_ccic");
+       adap->dev.parent = &cam->pdev->dev;
        i2c_set_adapdata(adap, cam);
        ret = i2c_add_adapter(adap);
        if (ret)
@@ -1021,7 +1022,7 @@ static ssize_t cafe_v4l_read(struct file *filp,
                char __user *buffer, size_t len, loff_t *pos)
 {
        struct cafe_camera *cam = filp->private_data;
-       int ret;
+       int ret = 0;
 
        /*
         * Perhaps we're in speculative read mode and already
@@ -1194,7 +1195,7 @@ static int cafe_vidioc_reqbufs(struct file *filp, void *priv,
                struct v4l2_requestbuffers *req)
 {
        struct cafe_camera *cam = filp->private_data;
-       int ret;
+       int ret = 0;  /* Silence warning */
 
        /*
         * Make sure it's something we can do.  User pointers could be
@@ -1250,8 +1251,6 @@ static int cafe_vidioc_reqbufs(struct file *filp, void *priv,
 
        if (cam->n_sbufs == 0)  /* no luck at all - ret already set */
                kfree(cam->sb_bufs);
-       else
-               ret = 0;
        req->count = cam->n_sbufs;  /* In case of partial success */
 
   out:
@@ -1715,7 +1714,7 @@ static void cafe_v4l_dev_release(struct video_device *vd)
  * clone it for specific real devices.
  */
 
-static struct file_operations cafe_v4l_fops = {
+static const struct file_operations cafe_v4l_fops = {
        .owner = THIS_MODULE,
        .open = cafe_v4l_open,
        .release = cafe_v4l_release,
@@ -1969,7 +1968,7 @@ static ssize_t cafe_dfs_read_regs(struct file *file,
                        s - cafe_debug_buf);
 }
 
-static struct file_operations cafe_dfs_reg_ops = {
+static const struct file_operations cafe_dfs_reg_ops = {
        .owner = THIS_MODULE,
        .read = cafe_dfs_read_regs,
        .open = cafe_dfs_open
@@ -1995,7 +1994,7 @@ static ssize_t cafe_dfs_read_cam(struct file *file,
                        s - cafe_debug_buf);
 }
 
-static struct file_operations cafe_dfs_cam_ops = {
+static const struct file_operations cafe_dfs_cam_ops = {
        .owner = THIS_MODULE,
        .read = cafe_dfs_read_cam,
        .open = cafe_dfs_open
@@ -2166,7 +2165,7 @@ static void cafe_pci_remove(struct pci_dev *pdev)
        struct cafe_camera *cam = cafe_find_by_pdev(pdev);
 
        if (cam == NULL) {
-               cam_warn(cam, "pci_remove on unknown pdev %p\n", pdev);
+               printk(KERN_WARNING "pci_remove on unknown pdev %p\n", pdev);
                return;
        }
        mutex_lock(&cam->s_mutex);