linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: linux-media@vger.kernel.org
Cc: kernel@collabora.com, Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH v2 0/6] V4L2 core I2C/SPI code cleanup
Date: Thu, 15 Aug 2019 13:48:00 -0300	[thread overview]
Message-ID: <20190815164806.19248-1-ezequiel@collabora.com> (raw)

Hi Mauro, Hans:

A new spin of this cleanup series. Goal here
is to remove some ifdefs and while at it remove some
low hanging fruit.

Patch 1 merges v4l2-common.ko into videodev.ko, since
it doesn't seem to be useful to have them splitted.

Patches 2 to 5 move the I2C and SPI helpers, so they
can be conditionally built.

Patch 6 removes unneeded BUG() calls in these helpers.
Hans, you suggested to replace BUG with WARN_ON,
but it seemed that just returning NULL was fine.

There are a few checkpatch.pl issues triggered here,
all of them belonging to the already existing code.
I'm not addressing that in this series.

The entire series should not affect any functionality,
but just clean-up the code a bit.

Thanks,
Eze

Ezequiel Garcia (6):
  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
  media: v4l2-core: Remove BUG() from i2c and spi helpers

 drivers/media/v4l2-core/Kconfig       |   5 +
 drivers/media/v4l2-core/Makefile      |   5 +-
 drivers/media/v4l2-core/v4l2-common.c | 214 --------------------------
 drivers/media/v4l2-core/v4l2-dev.c    |   4 +-
 drivers/media/v4l2-core/v4l2-device.c |  39 +----
 drivers/media/v4l2-core/v4l2-i2c.c    | 168 ++++++++++++++++++++
 drivers/media/v4l2-core/v4l2-spi.c    |  73 +++++++++
 include/media/v4l2-common.h           | 150 +++++++++++++-----
 8 files changed, 366 insertions(+), 292 deletions(-)
 create mode 100644 drivers/media/v4l2-core/v4l2-i2c.c
 create mode 100644 drivers/media/v4l2-core/v4l2-spi.c

-- 
2.22.0


             reply	other threads:[~2019-08-15 16:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 16:48 Ezequiel Garcia [this message]
2019-08-15 16:48 ` [PATCH v2 1/6] media: v4l2-core: Module re-organization Ezequiel Garcia
2019-08-15 16:48 ` [PATCH v2 2/6] media: v4l2-core: move spi helpers out of v4l2-common.c Ezequiel Garcia
2019-08-15 16:48 ` [PATCH v2 3/6] media: v4l2-core: move i2c " Ezequiel Garcia
2019-08-15 16:48 ` [PATCH v2 4/6] media: v4l2-core: introduce a helper to unregister a spi subdev Ezequiel Garcia
2019-08-15 16:48 ` [PATCH v2 5/6] media: v4l2-core: introduce a helper to unregister a i2c subdev Ezequiel Garcia
2019-08-15 16:48 ` [PATCH v2 6/6] media: v4l2-core: Remove BUG() from i2c and spi helpers Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190815164806.19248-1-ezequiel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=kernel@collabora.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).