Skip to content

Commit 8af2c28

Browse files
plagniojtomba
authored andcommitted
video: atmel_lcdfb: fix platform data struct
Today we mix pdata and drivers data in the struct atmel_lcdfb_info Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
1 parent 090fd59 commit 8af2c28

File tree

21 files changed

+109
-101
lines changed

21 files changed

+109
-101
lines changed

arch/arm/mach-at91/at91sam9261_devices.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
465465

466466
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
467467
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
468-
static struct atmel_lcdfb_info lcdc_data;
468+
static struct atmel_lcdfb_pdata lcdc_data;
469469

470470
static struct resource lcdc_resources[] = {
471471
[0] = {
@@ -498,7 +498,7 @@ static struct platform_device at91_lcdc_device = {
498498
.num_resources = ARRAY_SIZE(lcdc_resources),
499499
};
500500

501-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
501+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
502502
{
503503
if (!data) {
504504
return;
@@ -559,7 +559,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
559559
platform_device_register(&at91_lcdc_device);
560560
}
561561
#else
562-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
562+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
563563
#endif
564564

565565

arch/arm/mach-at91/at91sam9263_devices.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ void __init at91_add_device_can(struct at91_can_data *data) {}
832832

833833
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
834834
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
835-
static struct atmel_lcdfb_info lcdc_data;
835+
static struct atmel_lcdfb_pdata lcdc_data;
836836

837837
static struct resource lcdc_resources[] = {
838838
[0] = {
@@ -859,7 +859,7 @@ static struct platform_device at91_lcdc_device = {
859859
.num_resources = ARRAY_SIZE(lcdc_resources),
860860
};
861861

862-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
862+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
863863
{
864864
if (!data)
865865
return;
@@ -891,7 +891,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
891891
platform_device_register(&at91_lcdc_device);
892892
}
893893
#else
894-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
894+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
895895
#endif
896896

897897

arch/arm/mach-at91/at91sam9g45_devices.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ void __init at91_add_device_isi(struct isi_platform_data *data,
965965

966966
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
967967
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
968-
static struct atmel_lcdfb_info lcdc_data;
968+
static struct atmel_lcdfb_pdata lcdc_data;
969969

970970
static struct resource lcdc_resources[] = {
971971
[0] = {
@@ -991,7 +991,7 @@ static struct platform_device at91_lcdc_device = {
991991
.num_resources = ARRAY_SIZE(lcdc_resources),
992992
};
993993

994-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
994+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
995995
{
996996
if (!data)
997997
return;
@@ -1037,7 +1037,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
10371037
platform_device_register(&at91_lcdc_device);
10381038
}
10391039
#else
1040-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
1040+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
10411041
#endif
10421042

10431043

arch/arm/mach-at91/at91sam9rl_devices.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
498498

499499
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
500500
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
501-
static struct atmel_lcdfb_info lcdc_data;
501+
static struct atmel_lcdfb_pdata lcdc_data;
502502

503503
static struct resource lcdc_resources[] = {
504504
[0] = {
@@ -525,7 +525,7 @@ static struct platform_device at91_lcdc_device = {
525525
.num_resources = ARRAY_SIZE(lcdc_resources),
526526
};
527527

528-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
528+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
529529
{
530530
if (!data) {
531531
return;
@@ -557,7 +557,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
557557
platform_device_register(&at91_lcdc_device);
558558
}
559559
#else
560-
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
560+
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
561561
#endif
562562

563563

arch/arm/mach-at91/board-sam9261ek.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static void at91_lcdc_stn_power_control(int on)
401401
}
402402
}
403403

404-
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
404+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
405405
.default_bpp = 1,
406406
.default_dmacon = ATMEL_LCDC_DMAEN,
407407
.default_lcdcon2 = AT91SAM9261_DEFAULT_STN_LCDCON2,
@@ -453,7 +453,7 @@ static void at91_lcdc_tft_power_control(int on)
453453
at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
454454
}
455455

456-
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
456+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
457457
.lcdcon_is_backlight = true,
458458
.default_bpp = 16,
459459
.default_dmacon = ATMEL_LCDC_DMAEN,
@@ -465,7 +465,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
465465
#endif
466466

467467
#else
468-
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
468+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
469469
#endif
470470

471471

arch/arm/mach-at91/board-sam9263ek.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static void at91_lcdc_power_control(int on)
281281
}
282282

283283
/* Driver datas */
284-
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
284+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
285285
.lcdcon_is_backlight = true,
286286
.default_bpp = 16,
287287
.default_dmacon = ATMEL_LCDC_DMAEN,
@@ -292,7 +292,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
292292
};
293293

294294
#else
295-
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
295+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
296296
#endif
297297

298298

arch/arm/mach-at91/board-sam9m10g45ek.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
284284
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
285285

286286
/* Driver datas */
287-
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
287+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
288288
.lcdcon_is_backlight = true,
289289
.default_bpp = 32,
290290
.default_dmacon = ATMEL_LCDC_DMAEN,
@@ -295,7 +295,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
295295
};
296296

297297
#else
298-
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
298+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
299299
#endif
300300

301301

arch/arm/mach-at91/board-sam9rlek.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static void at91_lcdc_power_control(int on)
179179
}
180180

181181
/* Driver datas */
182-
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
182+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
183183
.lcdcon_is_backlight = true,
184184
.default_bpp = 16,
185185
.default_dmacon = ATMEL_LCDC_DMAEN,
@@ -191,7 +191,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
191191
};
192192

193193
#else
194-
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
194+
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
195195
#endif
196196

197197

arch/arm/mach-at91/board.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ extern void __init at91_add_device_pwm(u32 mask);
107107
extern void __init at91_add_device_ssc(unsigned id, unsigned pins);
108108

109109
/* LCD Controller */
110-
struct atmel_lcdfb_info;
111-
extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data);
110+
struct atmel_lcdfb_pdata;
111+
extern void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data);
112112

113113
/* AC97 */
114114
extern void __init at91_add_device_ac97(struct ac97c_platform_data *data);

arch/avr32/boards/atngw100/evklcd10x.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
5858
.dclkmax = 28330000,
5959
};
6060

61-
static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
61+
static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
6262
.default_bpp = 16,
6363
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
6464
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
@@ -96,7 +96,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
9696
.dclkmax = 7000000,
9797
};
9898

99-
static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
99+
static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
100100
.default_bpp = 16,
101101
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
102102
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
@@ -134,7 +134,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
134134
.dclkmax = 6400000,
135135
};
136136

137-
static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
137+
static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
138138
.default_bpp = 16,
139139
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
140140
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT

arch/avr32/boards/atngw100/mrmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static struct fb_monspecs __initdata lcd_fb_default_monspecs = {
8383
.dclkmax = 9260000,
8484
};
8585

86-
static struct atmel_lcdfb_info __initdata rmt_lcdc_data = {
86+
static struct atmel_lcdfb_pdata __initdata rmt_lcdc_data = {
8787
.default_bpp = 24,
8888
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
8989
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
@@ -126,7 +126,7 @@ static struct fb_monspecs __initdata lcd_fb_default_monspecs = {
126126
.dclkmax = 9260000,
127127
};
128128

129-
static struct atmel_lcdfb_info __initdata rmt_lcdc_data = {
129+
static struct atmel_lcdfb_pdata __initdata rmt_lcdc_data = {
130130
.default_bpp = 24,
131131
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
132132
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT

arch/avr32/boards/atstk1000/atstk1000.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H
1111
#define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H
1212

13-
extern struct atmel_lcdfb_info atstk1000_lcdc_data;
13+
extern struct atmel_lcdfb_pdata atstk1000_lcdc_data;
1414

1515
void atstk1000_setup_j2_leds(void);
1616

arch/avr32/boards/atstk1000/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static struct fb_monspecs __initdata atstk1000_default_monspecs = {
5555
.dclkmax = 30000000,
5656
};
5757

58-
struct atmel_lcdfb_info __initdata atstk1000_lcdc_data = {
58+
struct atmel_lcdfb_pdata __initdata atstk1000_lcdc_data = {
5959
.default_bpp = 24,
6060
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
6161
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT

arch/avr32/boards/favr-32/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static struct fb_monspecs __initdata favr32_default_monspecs = {
125125
.dclkmax = 28000000,
126126
};
127127

128-
struct atmel_lcdfb_info __initdata favr32_lcdc_data = {
128+
struct atmel_lcdfb_pdata __initdata favr32_lcdc_data = {
129129
.default_bpp = 16,
130130
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
131131
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT

arch/avr32/boards/hammerhead/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static struct fb_monspecs __initdata hammerhead_hda350t_monspecs = {
7777
.dclkmax = 10000000,
7878
};
7979

80-
struct atmel_lcdfb_info __initdata hammerhead_lcdc_data = {
80+
struct atmel_lcdfb_pdata __initdata hammerhead_lcdc_data = {
8181
.default_bpp = 24,
8282
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
8383
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT

arch/avr32/boards/merisc/display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static struct fb_monspecs merisc_fb_monspecs = {
4545
.dclkmax = 30000000,
4646
};
4747

48-
struct atmel_lcdfb_info merisc_lcdc_data = {
48+
struct atmel_lcdfb_pdata merisc_lcdc_data = {
4949
.default_bpp = 24,
5050
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
5151
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT

arch/avr32/boards/mimc200/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* published by the Free Software Foundation.
99
*/
1010

11-
extern struct atmel_lcdfb_info mimc200_lcdc_data;
11+
extern struct atmel_lcdfb_pdata mimc200_lcdc_data;
1212

1313
#include <linux/clk.h>
1414
#include <linux/etherdevice.h>
@@ -71,7 +71,7 @@ static struct fb_monspecs __initdata mimc200_default_monspecs = {
7171
.dclkmax = 25200000,
7272
};
7373

74-
struct atmel_lcdfb_info __initdata mimc200_lcdc_data = {
74+
struct atmel_lcdfb_pdata __initdata mimc200_lcdc_data = {
7575
.default_bpp = 16,
7676
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
7777
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT

arch/avr32/mach-at32ap/at32ap700x.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
14391439
* LCDC
14401440
* -------------------------------------------------------------------- */
14411441
#if defined(CONFIG_CPU_AT32AP7000) || defined(CONFIG_CPU_AT32AP7002)
1442-
static struct atmel_lcdfb_info atmel_lcdfb0_data;
1442+
static struct atmel_lcdfb_pdata atmel_lcdfb0_data;
14431443
static struct resource atmel_lcdfb0_resource[] = {
14441444
{
14451445
.start = 0xff000000,
@@ -1467,12 +1467,12 @@ static struct clk atmel_lcdfb0_pixclk = {
14671467
};
14681468

14691469
struct platform_device *__init
1470-
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
1470+
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_pdata *data,
14711471
unsigned long fbmem_start, unsigned long fbmem_len,
14721472
u64 pin_mask)
14731473
{
14741474
struct platform_device *pdev;
1475-
struct atmel_lcdfb_info *info;
1475+
struct atmel_lcdfb_pdata *info;
14761476
struct fb_monspecs *monspecs;
14771477
struct fb_videomode *modedb;
14781478
unsigned int modedb_size;
@@ -1529,7 +1529,7 @@ at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
15291529
}
15301530

15311531
info = pdev->dev.platform_data;
1532-
memcpy(info, data, sizeof(struct atmel_lcdfb_info));
1532+
memcpy(info, data, sizeof(struct atmel_lcdfb_pdata));
15331533
info->default_monspecs = monspecs;
15341534

15351535
pdev->name = "at32ap-lcdfb";

arch/avr32/mach-at32ap/include/mach/board.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ struct platform_device *
4444
at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
4545
void at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n);
4646

47-
struct atmel_lcdfb_info;
47+
struct atmel_lcdfb_pdata;
4848
struct platform_device *
49-
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
49+
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_pdata *data,
5050
unsigned long fbmem_start, unsigned long fbmem_len,
5151
u64 pin_mask);
5252

0 commit comments

Comments
 (0)