diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-08-23 11:50:28 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-08-26 08:52:39 -0400 |
commit | 084244646217ec83970facaf7baf200c02a8183e (patch) | |
tree | 446fa132f98912e783bc530724ce9cc584d31e15 /drivers/video | |
parent | 39917f08721b2f04d06407777ce7ae5913533674 (diff) |
video: fbdev: aty: 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: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/aty/aty128fb.c | 63 |
1 files changed, 55 insertions, 8 deletions
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index ff6070170d01..aedf2fbf9bf6 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c | |||
@@ -324,14 +324,61 @@ struct aty128_meminfo { | |||
324 | }; | 324 | }; |
325 | 325 | ||
326 | /* various memory configurations */ | 326 | /* various memory configurations */ |
327 | static const struct aty128_meminfo sdr_128 = | 327 | static const struct aty128_meminfo sdr_128 = { |
328 | { 4, 4, 3, 3, 1, 3, 1, 16, 30, 16, "128-bit SDR SGRAM (1:1)" }; | 328 | .ML = 4, |
329 | static const struct aty128_meminfo sdr_64 = | 329 | .MB = 4, |
330 | { 4, 8, 3, 3, 1, 3, 1, 17, 46, 17, "64-bit SDR SGRAM (1:1)" }; | 330 | .Trcd = 3, |
331 | static const struct aty128_meminfo sdr_sgram = | 331 | .Trp = 3, |
332 | { 4, 4, 1, 2, 1, 2, 1, 16, 24, 16, "64-bit SDR SGRAM (2:1)" }; | 332 | .Twr = 1, |
333 | static const struct aty128_meminfo ddr_sgram = | 333 | .CL = 3, |
334 | { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" }; | 334 | .Tr2w = 1, |
335 | .LoopLatency = 16, | ||
336 | .DspOn = 30, | ||
337 | .Rloop = 16, | ||
338 | .name = "128-bit SDR SGRAM (1:1)", | ||
339 | }; | ||
340 | |||
341 | static const struct aty128_meminfo sdr_64 = { | ||
342 | .ML = 4, | ||
343 | .MB = 8, | ||
344 | .Trcd = 3, | ||
345 | .Trp = 3, | ||
346 | .Twr = 1, | ||
347 | .CL = 3, | ||
348 | .Tr2w = 1, | ||
349 | .LoopLatency = 17, | ||
350 | .DspOn = 46, | ||
351 | .Rloop = 17, | ||
352 | .name = "64-bit SDR SGRAM (1:1)", | ||
353 | }; | ||
354 | |||
355 | static const struct aty128_meminfo sdr_sgram = { | ||
356 | .ML = 4, | ||
357 | .MB = 4, | ||
358 | .Trcd = 1, | ||
359 | .Trp = 2, | ||
360 | .Twr = 1, | ||
361 | .CL = 2, | ||
362 | .Tr2w = 1, | ||
363 | .LoopLatency = 16, | ||
364 | .DspOn = 24, | ||
365 | .Rloop = 16, | ||
366 | .name = "64-bit SDR SGRAM (2:1)", | ||
367 | }; | ||
368 | |||
369 | static const struct aty128_meminfo ddr_sgram = { | ||
370 | .ML = 4, | ||
371 | .MB = 4, | ||
372 | .Trcd = 3, | ||
373 | .Trp = 3, | ||
374 | .Twr = 2, | ||
375 | .CL = 3, | ||
376 | .Tr2w = 1, | ||
377 | .LoopLatency = 16, | ||
378 | .DspOn = 31, | ||
379 | .Rloop = 16, | ||
380 | .name = "64-bit DDR SGRAM", | ||
381 | }; | ||
335 | 382 | ||
336 | static struct fb_fix_screeninfo aty128fb_fix = { | 383 | static struct fb_fix_screeninfo aty128fb_fix = { |
337 | .id = "ATY Rage128", | 384 | .id = "ATY Rage128", |