]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] v4l: vsp1: video: Fix coding style
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 29 Feb 2016 02:28:38 +0000 (23:28 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 13 Apr 2016 20:25:17 +0000 (17:25 -0300)
Commit 54b5a749b4f3 ("[media] v4l: vsp1: Use media entity enumeration
interface") wasn't aligned with the driver coding style. Fix it by
renaming the rval variable to ret.

Furthermore shorten lines by accessing the media_device instance in a
more straightforward fashion.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vsp1/vsp1_video.c

index 72cc7d3729f8d7a1e41bf49c0145c95217f20d8b..b97bbdb1a2565228cad3bb4b4ba1684db091eba9 100644 (file)
@@ -175,31 +175,30 @@ static int vsp1_video_pipeline_validate_branch(struct vsp1_pipeline *pipe,
                                               struct vsp1_rwpf *input,
                                               struct vsp1_rwpf *output)
 {
-       struct vsp1_entity *entity;
        struct media_entity_enum ent_enum;
+       struct vsp1_entity *entity;
        struct media_pad *pad;
-       int rval;
        bool bru_found = false;
+       int ret;
 
        input->location.left = 0;
        input->location.top = 0;
 
-       rval = media_entity_enum_init(
-               &ent_enum, input->entity.pads[RWPF_PAD_SOURCE].graph_obj.mdev);
-       if (rval)
-               return rval;
+       ret = media_entity_enum_init(&ent_enum, &input->entity.vsp1->media_dev);
+       if (ret < 0)
+               return ret;
 
        pad = media_entity_remote_pad(&input->entity.pads[RWPF_PAD_SOURCE]);
 
        while (1) {
                if (pad == NULL) {
-                       rval = -EPIPE;
+                       ret = -EPIPE;
                        goto out;
                }
 
                /* We've reached a video node, that shouldn't have happened. */
                if (!is_media_entity_v4l2_subdev(pad->entity)) {
-                       rval = -EPIPE;
+                       ret = -EPIPE;
                        goto out;
                }
 
@@ -229,14 +228,14 @@ static int vsp1_video_pipeline_validate_branch(struct vsp1_pipeline *pipe,
                /* Ensure the branch has no loop. */
                if (media_entity_enum_test_and_set(&ent_enum,
                                                   &entity->subdev.entity)) {
-                       rval = -EPIPE;
+                       ret = -EPIPE;
                        goto out;
                }
 
                /* UDS can't be chained. */
                if (entity->type == VSP1_ENTITY_UDS) {
                        if (pipe->uds) {
-                               rval = -EPIPE;
+                               ret = -EPIPE;
                                goto out;
                        }
 
@@ -256,12 +255,12 @@ static int vsp1_video_pipeline_validate_branch(struct vsp1_pipeline *pipe,
 
        /* The last entity must be the output WPF. */
        if (entity != &output->entity)
-               rval = -EPIPE;
+               ret = -EPIPE;
 
 out:
        media_entity_enum_cleanup(&ent_enum);
 
-       return rval;
+       return ret;
 }
 
 static int vsp1_video_pipeline_validate(struct vsp1_pipeline *pipe,