Skip to content

Commit bb4bba9

Browse files
Sakari Ailusmchehab
authored andcommitted
media: v4l2-fwnode: Make bus configuration a struct
The bus specific parameters were a 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> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 2e65443 commit bb4bba9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/media/v4l2-fwnode.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct v4l2_fwnode_bus_mipi_csi1 {
7878
* struct v4l2_fwnode_endpoint - the endpoint data structure
7979
* @base: fwnode endpoint of the v4l2_fwnode
8080
* @bus_type: bus type
81-
* @bus: union with bus configuration data structure
81+
* @bus: bus configuration data structure
8282
* @bus.parallel: embedded &struct v4l2_fwnode_bus_parallel.
8383
* Used if the bus is parallel.
8484
* @bus.mipi_csi1: embedded &struct v4l2_fwnode_bus_mipi_csi1.
@@ -99,7 +99,7 @@ struct v4l2_fwnode_endpoint {
9999
* v4l2_fwnode_endpoint_parse()
100100
*/
101101
enum v4l2_mbus_type bus_type;
102-
union {
102+
struct {
103103
struct v4l2_fwnode_bus_parallel parallel;
104104
struct v4l2_fwnode_bus_mipi_csi1 mipi_csi1;
105105
struct v4l2_fwnode_bus_mipi_csi2 mipi_csi2;

0 commit comments

Comments
 (0)