aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/macfb.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2008-11-18 14:45:22 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2008-12-28 14:00:05 -0500
commit3839d01d61195d76d53943ac36b603d7e7ca4b6e (patch)
treeddc6f873b1237c55e236acab79a267fce9669654 /drivers/video/macfb.c
parent746e8d3b223281f0e5472ab0ad8f59af2221ea9b (diff)
macfb annotations and compiler warning fix
Add some __iomem annotations. Remove some volatile qualifiers to fix several compiler warnings: "passing arg 1 of `iounmap' discards qualifiers from pointer target type". Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/video/macfb.c')
-rw-r--r--drivers/video/macfb.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c
index 3a437f937779..d66887e8cbb1 100644
--- a/drivers/video/macfb.c
+++ b/drivers/video/macfb.c
@@ -77,34 +77,34 @@ static int csc_setpalette (unsigned int regno, unsigned int red,
77 unsigned int green, unsigned int blue, 77 unsigned int green, unsigned int blue,
78 struct fb_info *fb_info); 78 struct fb_info *fb_info);
79 79
80static volatile struct { 80static struct {
81 unsigned char addr; 81 unsigned char addr;
82 /* Note: word-aligned */ 82 /* Note: word-aligned */
83 char pad[3]; 83 char pad[3];
84 unsigned char lut; 84 unsigned char lut;
85} *valkyrie_cmap_regs; 85} __iomem *valkyrie_cmap_regs;
86 86
87static volatile struct { 87static struct {
88 unsigned char addr; 88 unsigned char addr;
89 unsigned char lut; 89 unsigned char lut;
90} *v8_brazil_cmap_regs; 90} __iomem *v8_brazil_cmap_regs;
91 91
92static volatile struct { 92static struct {
93 unsigned char addr; 93 unsigned char addr;
94 char pad1[3]; /* word aligned */ 94 char pad1[3]; /* word aligned */
95 unsigned char lut; 95 unsigned char lut;
96 char pad2[3]; /* word aligned */ 96 char pad2[3]; /* word aligned */
97 unsigned char cntl; /* a guess as to purpose */ 97 unsigned char cntl; /* a guess as to purpose */
98} *rbv_cmap_regs; 98} __iomem *rbv_cmap_regs;
99 99
100static volatile struct { 100static struct {
101 unsigned long reset; 101 unsigned long reset;
102 unsigned long pad1[3]; 102 unsigned long pad1[3];
103 unsigned char pad2[3]; 103 unsigned char pad2[3];
104 unsigned char lut; 104 unsigned char lut;
105} *dafb_cmap_regs; 105} __iomem *dafb_cmap_regs;
106 106
107static volatile struct { 107static struct {
108 unsigned char addr; /* OFFSET: 0x00 */ 108 unsigned char addr; /* OFFSET: 0x00 */
109 unsigned char pad1[15]; 109 unsigned char pad1[15];
110 unsigned char lut; /* OFFSET: 0x10 */ 110 unsigned char lut; /* OFFSET: 0x10 */
@@ -113,16 +113,16 @@ static volatile struct {
113 unsigned char pad3[7]; 113 unsigned char pad3[7];
114 unsigned long vbl_addr; /* OFFSET: 0x28 */ 114 unsigned long vbl_addr; /* OFFSET: 0x28 */
115 unsigned int status2; /* OFFSET: 0x2C */ 115 unsigned int status2; /* OFFSET: 0x2C */
116} *civic_cmap_regs; 116} __iomem *civic_cmap_regs;
117 117
118static volatile struct { 118static struct {
119 char pad1[0x40]; 119 char pad1[0x40];
120 unsigned char clut_waddr; /* 0x40 */ 120 unsigned char clut_waddr; /* 0x40 */
121 char pad2; 121 char pad2;
122 unsigned char clut_data; /* 0x42 */ 122 unsigned char clut_data; /* 0x42 */
123 char pad3[0x3]; 123 char pad3[0x3];
124 unsigned char clut_raddr; /* 0x46 */ 124 unsigned char clut_raddr; /* 0x46 */
125} *csc_cmap_regs; 125} __iomem *csc_cmap_regs;
126 126
127/* We will leave these the way they are for the time being */ 127/* We will leave these the way they are for the time being */
128struct mdc_cmap_regs { 128struct mdc_cmap_regs {
@@ -506,10 +506,10 @@ static int csc_setpalette (unsigned int regno, unsigned int red,
506 struct fb_info *info) 506 struct fb_info *info)
507{ 507{
508 mdelay(1); 508 mdelay(1);
509 csc_cmap_regs->clut_waddr = regno; 509 nubus_writeb(regno, &csc_cmap_regs->clut_waddr);
510 csc_cmap_regs->clut_data = red; 510 nubus_writeb(red, &csc_cmap_regs->clut_data);
511 csc_cmap_regs->clut_data = green; 511 nubus_writeb(green, &csc_cmap_regs->clut_data);
512 csc_cmap_regs->clut_data = blue; 512 nubus_writeb(blue, &csc_cmap_regs->clut_data);
513 return 0; 513 return 0;
514} 514}
515 515