All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com,
	kieran.bingham@ideasonboard.com, niklas.soderlund@ragnatech.se,
	jacopo@jmondi.org
Subject: [PATCH 2/3] v4l2-fwnode: Make bus configuration a struct
Date: Tue,  8 Sep 2020 11:51:20 +0300	[thread overview]
Message-ID: <20200908085121.864-3-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20200908085121.864-1-sakari.ailus@linux.intel.com>

The bus specific parameters were an union. This made providing bus
specific defaults impossible as the memory used to store the defaults for
multiple different busses was the same.

Make it struct instead. It's not large so the size isn't really an issue.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 include/media/v4l2-fwnode.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/media/v4l2-fwnode.h b/include/media/v4l2-fwnode.h
index 81e7eb123294..d04f39b60096 100644
--- a/include/media/v4l2-fwnode.h
+++ b/include/media/v4l2-fwnode.h
@@ -78,7 +78,7 @@ struct v4l2_fwnode_bus_mipi_csi1 {
  * struct v4l2_fwnode_endpoint - the endpoint data structure
  * @base: fwnode endpoint of the v4l2_fwnode
  * @bus_type: bus type
- * @bus: union with bus configuration data structure
+ * @bus: bus configuration data structure
  * @bus.parallel: embedded &struct v4l2_fwnode_bus_parallel.
  *		  Used if the bus is parallel.
  * @bus.mipi_csi1: embedded &struct v4l2_fwnode_bus_mipi_csi1.
@@ -99,7 +99,7 @@ struct v4l2_fwnode_endpoint {
 	 * v4l2_fwnode_endpoint_parse()
 	 */
 	enum v4l2_mbus_type bus_type;
-	union {
+	struct {
 		struct v4l2_fwnode_bus_parallel parallel;
 		struct v4l2_fwnode_bus_mipi_csi1 mipi_csi1;
 		struct v4l2_fwnode_bus_mipi_csi2 mipi_csi2;
-- 
2.27.0


  parent reply	other threads:[~2020-09-08  8:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  8:51 [PATCH 0/3] Improve V4L2 fwnode framework usability and documentation Sakari Ailus
2020-09-08  8:51 ` [PATCH 1/3] v4l2-fwnode: Make number of data lanes a character Sakari Ailus
2020-09-08 12:40   ` Laurent Pinchart
2020-09-08  8:51 ` Sakari Ailus [this message]
2020-09-08 12:47   ` [PATCH 2/3] v4l2-fwnode: Make bus configuration a struct Laurent Pinchart
2020-09-08  8:51 ` [PATCH 3/3] v4l2-fwnode: Document changes usage patterns of v4l2_fwnode_endpoint_parse Sakari Ailus
2020-09-08  8:55   ` Sakari Ailus
2020-09-08 12:51   ` Laurent Pinchart
2020-09-08 13:33     ` Sakari Ailus
2020-09-14 14:55   ` Jacopo Mondi

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=20200908085121.864-3-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=jacopo@jmondi.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.