OSDN Git Service

media: v4l: fwnode: The clock lane is the first lane in lane_polarities
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 14 Aug 2017 10:22:14 +0000 (06:22 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 26 Aug 2017 17:51:57 +0000 (13:51 -0400)
The clock lane is the first lane in the lane_polarities array. Reflect this
consistently by putting the number of data lanes after the number of clock
lanes.

Fixes: 4ee236219f6d ("media: v4l2-fwnode: suppress a warning at OF parsing logic")

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/v4l2-fwnode.c
include/media/v4l2-fwnode.h

index 3f8eed0..df7169b 100644 (file)
@@ -48,7 +48,7 @@ static int v4l2_fwnode_endpoint_parse_csi2_bus(struct fwnode_handle *fwnode,
 
        rval = fwnode_property_read_u32_array(fwnode, "data-lanes", NULL, 0);
        if (rval > 0) {
-               u32 array[MAX_DATA_LANES + 1];
+               u32 array[1 + MAX_DATA_LANES];
 
                bus->num_data_lanes = min_t(int, MAX_DATA_LANES, rval);
 
index cb34dcb..08e743f 100644 (file)
@@ -42,7 +42,7 @@ struct v4l2_fwnode_bus_mipi_csi2 {
        unsigned char data_lanes[MAX_DATA_LANES];
        unsigned char clock_lane;
        unsigned short num_data_lanes;
-       bool lane_polarities[MAX_DATA_LANES + 1];
+       bool lane_polarities[1 + MAX_DATA_LANES];
 };
 
 /**