Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f7c09b9 authored by Russell King - ARM Linux's avatar Russell King - ARM Linux Committed by Mauro Carvalho Chehab
Browse files

[media] media/i2c: ths8200: fix build failure with gcc 4.5.4



v3.12-rc fails to build with this error:
drivers/media/i2c/ths8200.c:49:2: error: unknown field 'bt' specified in initializer
drivers/media/i2c/ths8200.c:50:3: error: field name not in record or union initializer
drivers/media/i2c/ths8200.c:50:3: error: (near initialization for 'ths8200_timings_cap.reserved')
drivers/media/i2c/ths8200.c:51:3: error: field name not in record or union initializer
drivers/media/i2c/ths8200.c:51:3: error: (near initialization for 'ths8200_timings_cap.reserved')
...
with gcc 4.5.4.  This error was not detected in builds prior to v3.12-rc.
This patch fixes this.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Cc: stable@vger.kernel.org # For kernel v3.12
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 6dbea9f0
Loading
Loading
Loading
Loading
+11 −7
Original line number Original line Diff line number Diff line
@@ -46,6 +46,9 @@ struct ths8200_state {


static const struct v4l2_dv_timings_cap ths8200_timings_cap = {
static const struct v4l2_dv_timings_cap ths8200_timings_cap = {
	.type = V4L2_DV_BT_656_1120,
	.type = V4L2_DV_BT_656_1120,
	/* Allow gcc 4.5.4 to build this */
	.reserved = { },
	{
		.bt = {
		.bt = {
			.max_width = 1920,
			.max_width = 1920,
			.max_height = 1080,
			.max_height = 1080,
@@ -54,6 +57,7 @@ static const struct v4l2_dv_timings_cap ths8200_timings_cap = {
			.standards = V4L2_DV_BT_STD_CEA861,
			.standards = V4L2_DV_BT_STD_CEA861,
			.capabilities = V4L2_DV_BT_CAP_PROGRESSIVE,
			.capabilities = V4L2_DV_BT_CAP_PROGRESSIVE,
		},
		},
	},
};
};


static inline struct ths8200_state *to_state(struct v4l2_subdev *sd)
static inline struct ths8200_state *to_state(struct v4l2_subdev *sd)