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

Commit 1287c5bf authored by Julia Lawall's avatar Julia Lawall Committed by Tomi Valkeinen
Browse files

video: fbdev: matrox: use c99 initializers in structures

Use c99 initializers for structures.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/

)

// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@

struct i1 i2 = { is,
+ .fld = e
- e
 ,...};
// </smpl>

Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 68ecfe2f
Loading
Loading
Loading
Loading
+45 −7
Original line number Diff line number Diff line
@@ -1341,19 +1341,57 @@ struct video_board {
	struct matrox_switch* lowlevel;
		 };
#ifdef CONFIG_FB_MATROX_MILLENIUM
static struct video_board vbMillennium		= {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGA2064W,	&matrox_millennium};
static struct video_board vbMillennium2		= {0x1000000, 0x0800000, FB_ACCEL_MATROX_MGA2164W,	&matrox_millennium};
static struct video_board vbMillennium2A	= {0x1000000, 0x0800000, FB_ACCEL_MATROX_MGA2164W_AGP,	&matrox_millennium};
static struct video_board vbMillennium = {
	.maxvram = 0x0800000,
	.maxdisplayable = 0x0800000,
	.accelID = FB_ACCEL_MATROX_MGA2064W,
	.lowlevel = &matrox_millennium
};

static struct video_board vbMillennium2 = {
	.maxvram = 0x1000000,
	.maxdisplayable = 0x0800000,
	.accelID = FB_ACCEL_MATROX_MGA2164W,
	.lowlevel = &matrox_millennium
};

static struct video_board vbMillennium2A = {
	.maxvram = 0x1000000,
	.maxdisplayable = 0x0800000,
	.accelID = FB_ACCEL_MATROX_MGA2164W_AGP,
	.lowlevel = &matrox_millennium
};
#endif	/* CONFIG_FB_MATROX_MILLENIUM */
#ifdef CONFIG_FB_MATROX_MYSTIQUE
static struct video_board vbMystique		= {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGA1064SG,	&matrox_mystique};
static struct video_board vbMystique = {
	.maxvram = 0x0800000,
	.maxdisplayable = 0x0800000,
	.accelID = FB_ACCEL_MATROX_MGA1064SG,
	.lowlevel = &matrox_mystique
};
#endif	/* CONFIG_FB_MATROX_MYSTIQUE */
#ifdef CONFIG_FB_MATROX_G
static struct video_board vbG100		= {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGAG100,	&matrox_G100};
static struct video_board vbG200		= {0x1000000, 0x1000000, FB_ACCEL_MATROX_MGAG200,	&matrox_G100};
static struct video_board vbG100 = {
	.maxvram = 0x0800000,
	.maxdisplayable = 0x0800000,
	.accelID = FB_ACCEL_MATROX_MGAG100,
	.lowlevel = &matrox_G100
};

static struct video_board vbG200 = {
	.maxvram = 0x1000000,
	.maxdisplayable = 0x1000000,
	.accelID = FB_ACCEL_MATROX_MGAG200,
	.lowlevel = &matrox_G100
};
/* from doc it looks like that accelerator can draw only to low 16MB :-( Direct accesses & displaying are OK for
   whole 32MB */
static struct video_board vbG400		= {0x2000000, 0x1000000, FB_ACCEL_MATROX_MGAG400,	&matrox_G100};
static struct video_board vbG400 = {
	.maxvram = 0x2000000,
	.maxdisplayable = 0x1000000,
	.accelID = FB_ACCEL_MATROX_MGAG400,
	.lowlevel = &matrox_G100
};
#endif

#define DEVF_VIDEO64BIT		0x0001
+11 −9
Original line number Diff line number Diff line
@@ -201,21 +201,23 @@ struct matrox_pll_ctl {
};

static const struct matrox_pll_features2 maven1000_pll = {
	 50000000,
	300000000,
	 5, 128,
	 3,  32,
	 3
	.vco_freq_min = 50000000,
	.vco_freq_max = 300000000,
	.feed_div_min = 5,
	.feed_div_max = 128,
	.in_div_min = 3,
	.in_div_max = 32,
	.post_shift_max = 3
};

static const struct matrox_pll_ctl maven_PAL = {
	540000,
	    50
	.ref_freq = 540000,
	.den = 50
};

static const struct matrox_pll_ctl maven_NTSC = {
	450450,	/* 27027000/60 == 27000000/59.94005994 */
	    60
	.ref_freq = 450450,	/* 27027000/60 == 27000000/59.94005994 */
	.den = 60
};

static int matroxfb_PLL_mavenclock(const struct matrox_pll_features2* pll,