Merge tag 'for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power...
[firefly-linux-kernel-4.4.55.git] / drivers / staging / most / aim-v4l2 / video.c
index 345a8243731137c2338f10cac923fa1f997ddc6f..13abf7c275a4e9809c5e2eb02faf1a135493a5af 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "mostcore.h"
 
-
 #define V4L2_AIM_MAX_INPUT  1
 
 static struct most_aim aim_info;
@@ -60,11 +59,9 @@ struct aim_fh {
        u32 offs;
 };
 
-
 static struct list_head video_devices = LIST_HEAD_INIT(video_devices);
 static struct spinlock list_lock;
 
-
 static inline bool data_ready(struct most_video_dev *mdev)
 {
        return !list_empty(&mdev->pending_mbos);
@@ -75,7 +72,6 @@ static inline struct mbo *get_top_mbo(struct most_video_dev *mdev)
        return list_first_entry(&mdev->pending_mbos, struct mbo, list);
 }
 
-
 static int aim_vdev_open(struct file *filp)
 {
        int ret;
@@ -92,7 +88,7 @@ static int aim_vdev_open(struct file *filp)
                return -EINVAL;
        }
 
-       fh = kzalloc(sizeof(struct aim_fh), GFP_KERNEL);
+       fh = kzalloc(sizeof(*fh), GFP_KERNEL);
        if (!fh)
                return -ENOMEM;
 
@@ -243,28 +239,6 @@ static void aim_set_format_struct(struct v4l2_format *f)
 static int aim_set_format(struct most_video_dev *mdev, unsigned int cmd,
                          struct v4l2_format *format)
 {
-#if 0
-       u32 const pixfmt = format->fmt.pix.pixelformat;
-       const char *fmt;
-
-       if (pixfmt != V4L2_PIX_FMT_MPEG) {
-               if (cmd == VIDIOC_TRY_FMT)
-                       fmt = KERN_ERR "try %c%c%c%c failed\n";
-               else
-                       fmt = KERN_ERR "set %c%c%c%c failed\n";
-       } else {
-               if (cmd == VIDIOC_TRY_FMT)
-                       fmt = KERN_ERR "try %c%c%c%c\n";
-               else
-                       fmt = KERN_ERR "set %c%c%c%c\n";
-       }
-       printk(fmt,
-              (pixfmt) & 255,
-              (pixfmt >> 8) & 255,
-              (pixfmt >> 16) & 255,
-              (pixfmt >> 24) & 255);
-#endif
-
        if (format->fmt.pix.pixelformat != V4L2_PIX_FMT_MPEG)
                return -EINVAL;
 
@@ -276,7 +250,6 @@ static int aim_set_format(struct most_video_dev *mdev, unsigned int cmd,
        return 0;
 }
 
-
 static int vidioc_querycap(struct file *file, void  *priv,
                           struct v4l2_capability *cap)
 {
@@ -496,7 +469,6 @@ static void aim_unregister_videodev(struct most_video_dev *mdev)
        video_unregister_device(mdev->vdev);
 }
 
-
 static void aim_v4l2_dev_release(struct v4l2_device *v4l2_dev)
 {
        struct most_video_dev *mdev =