diff --git a/modules/camera/3_4/v4l2_camera.cpp b/modules/camera/3_4/v4l2_camera.cpp
index 9ebefeb..521f835 100644
--- a/modules/camera/3_4/v4l2_camera.cpp
+++ b/modules/camera/3_4/v4l2_camera.cpp
@@ -18,8 +18,8 @@
 
 #include <fcntl.h>
 #include <linux/videodev2.h>
-#include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 
 #include <cstdlib>
 
@@ -36,8 +36,7 @@
 namespace v4l2_camera_hal {
 
 // Helper function for managing metadata.
-static std::vector<int32_t> getMetadataKeys(
-    const camera_metadata_t* metadata) {
+static std::vector<int32_t> getMetadataKeys(const camera_metadata_t* metadata) {
   std::vector<int32_t> keys;
   size_t num_entries = get_camera_metadata_entry_count(metadata);
   for (size_t i = 0; i < num_entries; ++i) {
@@ -67,7 +66,8 @@
   return new V4L2Camera(id, std::move(v4l2_wrapper), std::move(metadata));
 }
 
-V4L2Camera::V4L2Camera(int id, std::shared_ptr<V4L2Wrapper> v4l2_wrapper,
+V4L2Camera::V4L2Camera(int id,
+                       std::shared_ptr<V4L2Wrapper> v4l2_wrapper,
                        std::unique_ptr<Metadata> metadata)
     : default_camera_hal::Camera(id),
       device_(std::move(v4l2_wrapper)),
@@ -102,8 +102,8 @@
   // by disabling cameras that get disconnected and checking newly connected
   // cameras, so connect() is never called on an unsupported camera)
 
-  // TODO(b/29158098): Inform service of any flashes that are no longer available
-  // because this camera is in use.
+  // TODO(b/29158098): Inform service of any flashes that are no longer
+  // available because this camera is in use.
   return 0;
 }
 
@@ -126,14 +126,14 @@
   }
 
   // Extract max streams for use in verifying stream configs.
-  res = SingleTagValue(*out, ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
-                       &max_input_streams_);
+  res = SingleTagValue(
+      *out, ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS, &max_input_streams_);
   if (res) {
     HAL_LOGE("Failed to get max num input streams from static metadata.");
     return res;
   }
-  res = SingleTagValue(*out, ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS,
-                       &max_output_streams_);
+  res = SingleTagValue(
+      *out, ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, &max_output_streams_);
   if (res) {
     HAL_LOGE("Failed to get max num output streams from static metadata.");
     return res;
@@ -231,7 +231,8 @@
 }
 
 bool V4L2Camera::isSupportedStreamSet(default_camera_hal::Stream** streams,
-                                      int count, uint32_t mode) {
+                                      int count,
+                                      uint32_t mode) {
   HAL_LOG_ENTER();
 
   if (mode != CAMERA3_STREAM_CONFIGURATION_NORMAL_MODE) {
@@ -270,21 +271,28 @@
           break;
         case kFormatCategoryUnknown:  // Fall through.
         default:
-          HAL_LOGE("Unsupported format for stream %d: %d", i, stream->getFormat());
+          HAL_LOGE(
+              "Unsupported format for stream %d: %d", i, stream->getFormat());
           return false;
       }
     }
   }
 
-  if (num_input > max_input_streams_ ||
-      num_raw > max_output_streams_[0] ||
+  if (num_input > max_input_streams_ || num_raw > max_output_streams_[0] ||
       num_non_stalling > max_output_streams_[1] ||
       num_stalling > max_output_streams_[2]) {
-    HAL_LOGE("Invalid stream configuration: %d input, %d RAW, %d non-stalling, "
-             "%d stalling (max supported: %d input, %d RAW, %d non-stalling, "
-             "%d stalling)", max_input_streams_, max_output_streams_[0],
-             max_output_streams_[1], max_output_streams_[2], num_input,
-             num_raw, num_non_stalling, num_stalling);
+    HAL_LOGE(
+        "Invalid stream configuration: %d input, %d RAW, %d non-stalling, "
+        "%d stalling (max supported: %d input, %d RAW, %d non-stalling, "
+        "%d stalling)",
+        max_input_streams_,
+        max_output_streams_[0],
+        max_output_streams_[1],
+        max_output_streams_[2],
+        num_input,
+        num_raw,
+        num_non_stalling,
+        num_stalling);
     return false;
   }
 
@@ -301,11 +309,17 @@
     const default_camera_hal::Stream* stream = streams[i];
     if (stream->getFormat() != format || stream->getWidth() != width ||
         stream->getHeight() != height) {
-      HAL_LOGE("V4L2 only supports 1 stream configuration at a time "
-               "(stream 0 is format %d, width %u, height %u, "
-               "stream %d is format %d, width %u, height %u).",
-               format, width, height, i, stream->getFormat(),
-               stream->getWidth(), stream->getHeight());
+      HAL_LOGE(
+          "V4L2 only supports 1 stream configuration at a time "
+          "(stream 0 is format %d, width %u, height %u, "
+          "stream %d is format %d, width %u, height %u).",
+          format,
+          width,
+          height,
+          i,
+          stream->getFormat(),
+          stream->getWidth(),
+          stream->getHeight());
       return false;
     }
   }
@@ -342,7 +356,8 @@
   return 0;
 }
 
-bool V4L2Camera::isValidCaptureSettings(const android::CameraMetadata& settings) {
+bool V4L2Camera::isValidCaptureSettings(
+    const android::CameraMetadata& settings) {
   HAL_LOG_ENTER();
 
   return metadata_->IsValidRequest(settings);
diff --git a/modules/camera/3_4/v4l2_camera.h b/modules/camera/3_4/v4l2_camera.h
index d9af15d..804012b 100644
--- a/modules/camera/3_4/v4l2_camera.h
+++ b/modules/camera/3_4/v4l2_camera.h
@@ -35,16 +35,17 @@
 // while a specific camera device (e.g. V4L2Camera) holds all specific
 // metadata and logic about that device.
 class V4L2Camera : public default_camera_hal::Camera {
-public:
+ public:
   // Use this method to create V4L2Camera objects. Functionally equivalent
   // to "new V4L2Camera", except that it may return nullptr in case of failure.
   static V4L2Camera* NewV4L2Camera(int id, const std::string path);
   ~V4L2Camera();
 
-private:
+ private:
   // Constructor private to allow failing on bad input.
   // Use NewV4L2Camera instead.
-  V4L2Camera(int id, std::shared_ptr<V4L2Wrapper> v4l2_wrapper,
+  V4L2Camera(int id,
+             std::shared_ptr<V4L2Wrapper> v4l2_wrapper,
              std::unique_ptr<Metadata> metadata);
 
   // default_camera_hal::Camera virtual methods.
@@ -63,7 +64,8 @@
   int initDevice() override;
   // Verify stream configuration is device-compatible.
   bool isSupportedStreamSet(default_camera_hal::Stream** streams,
-                            int count, uint32_t mode) override;
+                            int count,
+                            uint32_t mode) override;
   // Set up the device for a stream, and get the maximum number of
   // buffers that stream can handle (max_buffers is an output parameter).
   int setupStream(default_camera_hal::Stream* stream,
@@ -71,8 +73,7 @@
   // Verify settings are valid for a capture with this device.
   bool isValidCaptureSettings(const android::CameraMetadata& settings) override;
   // Set settings for a capture.
-  int setSettings(
-            const android::CameraMetadata& new_settings) override;
+  int setSettings(const android::CameraMetadata& new_settings) override;
   // Enqueue a buffer to receive data from the camera.
   int enqueueBuffer(const camera3_stream_buffer_t* camera_buffer) override;
   // Get the shutter time and updated settings for the most recent frame.
diff --git a/modules/camera/3_4/v4l2_camera_hal.cpp b/modules/camera/3_4/v4l2_camera_hal.cpp
index 7996da9..bfc8712 100644
--- a/modules/camera/3_4/v4l2_camera_hal.cpp
+++ b/modules/camera/3_4/v4l2_camera_hal.cpp
@@ -22,8 +22,8 @@
 #include <fcntl.h>
 #include <linux/videodev2.h>
 #include <sys/ioctl.h>
-#include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include <algorithm>
@@ -86,8 +86,8 @@
     }
     // Read V4L2 capabilities.
     if (TEMP_FAILURE_RETRY(ioctl(fd, VIDIOC_QUERYCAP, &cap)) != 0) {
-      HAL_LOGE("VIDIOC_QUERYCAP on %s fail: %s.", node.c_str(),
-               strerror(errno));
+      HAL_LOGE(
+          "VIDIOC_QUERYCAP on %s fail: %s.", node.c_str(), strerror(errno));
     } else if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
       HAL_LOGE("%s is not a V4L2 video capture device.", node.c_str());
     } else {
@@ -137,8 +137,10 @@
   // "leave ops unchanged if no vendor tags are defined."
 }
 
-int V4L2CameraHAL::openLegacy(const hw_module_t* module, const char* id,
-                              uint32_t halVersion, hw_device_t** device) {
+int V4L2CameraHAL::openLegacy(const hw_module_t* module,
+                              const char* id,
+                              uint32_t halVersion,
+                              hw_device_t** device) {
   HAL_LOG_ENTER();
   // Not supported.
   return -ENOSYS;
@@ -151,13 +153,14 @@
   return -ENOSYS;
 }
 
-int V4L2CameraHAL::openDevice(const hw_module_t* module, const char* name,
+int V4L2CameraHAL::openDevice(const hw_module_t* module,
+                              const char* name,
                               hw_device_t** device) {
   HAL_LOG_ENTER();
 
   if (module != &HAL_MODULE_INFO_SYM.common) {
-    HAL_LOGE("Invalid module %p expected %p", module,
-             &HAL_MODULE_INFO_SYM.common);
+    HAL_LOGE(
+        "Invalid module %p expected %p", module, &HAL_MODULE_INFO_SYM.common);
     return -EINVAL;
   }
 
@@ -182,7 +185,7 @@
   return gCameraHAL.getCameraInfo(id, info);
 }
 
-static int set_callbacks(const camera_module_callbacks_t *callbacks) {
+static int set_callbacks(const camera_module_callbacks_t* callbacks) {
   return gCameraHAL.setCallbacks(callbacks);
 }
 
@@ -190,8 +193,10 @@
   return gCameraHAL.getVendorTagOps(ops);
 }
 
-static int open_legacy(const hw_module_t* module, const char* id,
-                       uint32_t halVersion, hw_device_t** device) {
+static int open_legacy(const hw_module_t* module,
+                       const char* id,
+                       uint32_t halVersion,
+                       hw_device_t** device) {
   return gCameraHAL.openLegacy(module, id, halVersion, device);
 }
 
@@ -199,7 +204,8 @@
   return gCameraHAL.setTorchMode(camera_id, enabled);
 }
 
-static int open_dev(const hw_module_t* module, const char* name,
+static int open_dev(const hw_module_t* module,
+                    const char* name,
                     hw_device_t** device) {
   return gCameraHAL.openDevice(module, name, device);
 }
@@ -207,27 +213,26 @@
 }  // namespace v4l2_camera_hal
 
 static hw_module_methods_t v4l2_module_methods = {
-  .open = v4l2_camera_hal::open_dev
-};
+    .open = v4l2_camera_hal::open_dev};
 
-camera_module_t HAL_MODULE_INFO_SYM __attribute__ ((visibility("default"))) = {
-  .common = {
-    .tag =                 HARDWARE_MODULE_TAG,
-    .module_api_version =  CAMERA_MODULE_API_VERSION_2_4,
-    .hal_api_version =     HARDWARE_HAL_API_VERSION,
-    .id =                  CAMERA_HARDWARE_MODULE_ID,
-    .name =                "V4L2 Camera HAL v3",
-    .author =              "The Android Open Source Project",
-    .methods =             &v4l2_module_methods,
-    .dso =                 nullptr,
-    .reserved =            {0},
-  },
-  .get_number_of_cameras =  v4l2_camera_hal::get_number_of_cameras,
-  .get_camera_info =        v4l2_camera_hal::get_camera_info,
-  .set_callbacks =          v4l2_camera_hal::set_callbacks,
-  .get_vendor_tag_ops =     v4l2_camera_hal::get_vendor_tag_ops,
-  .open_legacy =            v4l2_camera_hal::open_legacy,
-  .set_torch_mode =         v4l2_camera_hal::set_torch_mode,
-  .init =                   nullptr,
-  .reserved =               {nullptr, nullptr, nullptr, nullptr, nullptr}
-};
+camera_module_t HAL_MODULE_INFO_SYM __attribute__((visibility("default"))) = {
+    .common =
+        {
+            .tag = HARDWARE_MODULE_TAG,
+            .module_api_version = CAMERA_MODULE_API_VERSION_2_4,
+            .hal_api_version = HARDWARE_HAL_API_VERSION,
+            .id = CAMERA_HARDWARE_MODULE_ID,
+            .name = "V4L2 Camera HAL v3",
+            .author = "The Android Open Source Project",
+            .methods = &v4l2_module_methods,
+            .dso = nullptr,
+            .reserved = {0},
+        },
+    .get_number_of_cameras = v4l2_camera_hal::get_number_of_cameras,
+    .get_camera_info = v4l2_camera_hal::get_camera_info,
+    .set_callbacks = v4l2_camera_hal::set_callbacks,
+    .get_vendor_tag_ops = v4l2_camera_hal::get_vendor_tag_ops,
+    .open_legacy = v4l2_camera_hal::open_legacy,
+    .set_torch_mode = v4l2_camera_hal::set_torch_mode,
+    .init = nullptr,
+    .reserved = {nullptr, nullptr, nullptr, nullptr, nullptr}};
diff --git a/modules/camera/3_4/v4l2_camera_hal.h b/modules/camera/3_4/v4l2_camera_hal.h
index 91983b0..1b4ef0f 100644
--- a/modules/camera/3_4/v4l2_camera_hal.h
+++ b/modules/camera/3_4/v4l2_camera_hal.h
@@ -34,7 +34,7 @@
  * default CameraHAL from /hardware/libhardware/modules/camera.
  */
 class V4L2CameraHAL {
-public:
+ public:
   V4L2CameraHAL();
   ~V4L2CameraHAL();
 
@@ -43,23 +43,25 @@
   int getCameraInfo(int camera_id, camera_info_t* info);
   int setCallbacks(const camera_module_callbacks_t* callbacks);
   void getVendorTagOps(vendor_tag_ops_t* ops);
-  int openLegacy(const hw_module_t* module, const char* id,
-                 uint32_t halVersion, hw_device_t** device);
+  int openLegacy(const hw_module_t* module,
+                 const char* id,
+                 uint32_t halVersion,
+                 hw_device_t** device);
   int setTorchMode(const char* camera_id, bool enabled);
 
   // Hardware Module Interface (see <hardware/hardware.h>).
   int openDevice(const hw_module_t* mod, const char* name, hw_device_t** dev);
 
-private:
+ private:
   // Vector of cameras.
   std::vector<std::unique_ptr<default_camera_hal::Camera>> mCameras;
   // Callback handle.
-  const camera_module_callbacks_t *mCallbacks;
+  const camera_module_callbacks_t* mCallbacks;
 
   DISALLOW_COPY_AND_ASSIGN(V4L2CameraHAL);
 };
 
-} // namespace v4l2_camera_hal
+}  // namespace v4l2_camera_hal
 
 extern camera_module_t HAL_MODULE_INFO_SYM;
 
