]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: vc04_services: Join multiline dereferences
authorGenki Sky <sky@genki.is>
Wed, 6 Dec 2017 00:09:54 +0000 (19:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Dec 2017 08:48:54 +0000 (09:48 +0100)
This was found using checkpatch.pl's MULTILINE_DEREFERENCE warning.
Putting the dereference onto one line makes them easier to read,
especially when part of a larger expression (in this case, function
arguments and ternary operator), and when the dereferences are short
(as they are here).

Signed-off-by: Genki Sky <sky@genki.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c

index d8766b166675aff027ba4b9169bd02683c5bd0ff..4ed3b449f97f5d23a501903790883c3be3dc4de2 100644 (file)
@@ -328,11 +328,9 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
                                pr_debug("Grab another frame");
                                vchiq_mmal_port_parameter_set(
                                        instance,
-                                       dev->capture.
-                                       camera_port,
+                                       dev->capture.camera_port,
                                        MMAL_PARAMETER_CAPTURE,
-                                       &dev->capture.
-                                       frame_count,
+                                       &dev->capture.frame_count,
                                        sizeof(dev->capture.frame_count));
                        }
                } else {
@@ -368,11 +366,9 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
                                         "Grab another frame as buffer has EOS");
                                vchiq_mmal_port_parameter_set(
                                        instance,
-                                       dev->capture.
-                                       camera_port,
+                                       dev->capture.camera_port,
                                        MMAL_PARAMETER_CAPTURE,
-                                       &dev->capture.
-                                       frame_count,
+                                       &dev->capture.frame_count,
                                        sizeof(dev->capture.frame_count));
                        }
                } else {
@@ -1194,8 +1190,8 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev,
                                        port->current_buffer.size =
                                            (f->fmt.pix.sizeimage <
                                             (100 << 10))
-                                           ? (100 << 10) : f->fmt.pix.
-                                           sizeimage;
+                                           ? (100 << 10)
+                                           : f->fmt.pix.sizeimage;
                                }
                                v4l2_dbg(1, bcm2835_v4l2_debug,
                                         &dev->v4l2_dev,