[PATCH 0/3] media: i2c: gc0310: cleanups and sensor clock handling improvements

Sanjay Chitroda posted 3 patches 2 months, 1 week ago
drivers/media/i2c/gc0310.c | 128 +++++++++++++++++++++----------------
1 file changed, 73 insertions(+), 55 deletions(-)
[PATCH 0/3] media: i2c: gc0310: cleanups and sensor clock handling improvements
Posted by Sanjay Chitroda 2 months, 1 week ago
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>

Hi all,

This patch series improves resource cleanup, error handling, and clock
management in the gc0310 camera sensor driver.

The changes focus on making the probe path more robust and easier to
reason about by fixing error unwind paths, reducing repeated access to
core structures, and adopting the common V4L2 sensor clock helper to
avoid manual clock handling in the driver.

Key highlights of this series:
- Fix probe error handling to ensure resources are properly released on
  failure paths.
- Use cached I2C client and device pointers consistently across the
  driver for improved readability and maintainability.
- Switch to devm_v4l2_sensor_clk_get() to standardise external clock
  handling and align with modern V4L2 sensor driver expectations.

No functional behavior changes are intended.

Testing:
  - Compiled with W=1
  - Build-tested on QEMU x86_64

Based on:
  <linux-v7.0-rc5>

Feedback and reviews are very welcome.

Thanks,
Sanjay Chitroda


Sanjay Chitroda (3):
  media: i2c: gc0310: fix probe error handling and unwind resources
    properly
  media: i2c: gc0310: use cached client and device pointers
  media: i2c: gc0310: Use devm_v4l2_sensor_clk_get()

 drivers/media/i2c/gc0310.c | 128 +++++++++++++++++++++----------------
 1 file changed, 73 insertions(+), 55 deletions(-)

-- 
2.34.1