Re: [PATCH 0/6] V4L2 core I2C/SPI code cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/15/19 11:06 PM, Ezequiel Garcia wrote:
> Hi Mauro, Hans:
> 
> While reading v4l2-common.c, I came across a few ifdefs
> that could be cleaned-up with some minor reorganization.
> 
> Patch 1 is just cleaning the Makefile, removing ifeq/endif
> to make it more readable.
> 
> Patch 2 merges v4l2-common.ko into videodev.ko, which
> I think it's now possible. Let me know if having
> these two modules separated serves a purpose
> I'm missing.
> 
> The rest of the patches split the I2C and SPI helpers,
> so they can be conditionally built.
> 
> There are a few checkpatch.pl issues triggered here,
> all of them belonging to the already existing code.
> Let me know if you want me to clean that as well.
> 
> The entire series should not affect any functionality,
> but just clean-up the code a bit.

This series looks good, but since you are looking in this
area anyway, can you post a follow-up patch that replaces the
BUG_ON in v4l2-i2c.c and -spi.c with a WARN_ON?

Thanks!

	Hans

> 
> Thanks,
> Eze
> 
> Ezequiel Garcia (6):
>   media: v4l2-core: Cleanup Makefile
>   media: v4l2-core: Module re-organization
>   media: v4l2-core: move spi helpers out of v4l2-common.c
>   media: v4l2-core: move i2c helpers out of v4l2-common.c
>   media: v4l2-core: introduce a helper to unregister a SPI subdev
>   media: v4l2-core: introduce a helper to unregister a I2C subdev
> 
>  drivers/media/v4l2-core/Kconfig       |   5 +
>  drivers/media/v4l2-core/Makefile      |  15 +-
>  drivers/media/v4l2-core/v4l2-common.c | 210 --------------------------
>  drivers/media/v4l2-core/v4l2-device.c |  39 +----
>  drivers/media/v4l2-core/v4l2-i2c.c    | 167 ++++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-spi.c    |  73 +++++++++
>  include/media/v4l2-common.h           | 150 +++++++++++++-----
>  7 files changed, 366 insertions(+), 293 deletions(-)
>  create mode 100644 drivers/media/v4l2-core/v4l2-i2c.c
>  create mode 100644 drivers/media/v4l2-core/v4l2-spi.c
> 




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux